Module captcherl

Simplifies the process of verifying CAPTCHA responses.

Authors: bunopnu.

Description

Simplifies the process of verifying CAPTCHA responses.

Erlang library that provides easy-to-use functions for interacting with Cloudflare Turnstile, reCAPTCHA and hCaptcha.

Data Types

api_request_data()

api_request_data() = {Secret::unicode:chardata(), Response::unicode:chardata()} | {Secret::unicode:chardata(), Response::unicode:chardata(), IpAddress::unicode:chardata()}

Representing the data required for making a request.

captcha_services()

captcha_services() = turnstile | recaptcha | hcaptcha

Representing the available CAPTCHA services.

request_response()

request_response() = {ok, map()} | {error, term()}

Representing the response from a CAPTCHA service request.

Function Index

request/2 Sends a request to the specified CAPTCHA service and returns the response.
start/0 Starts the application along with its dependent applications.
verify/2 Verifies the CAPTCHA response from the specified service and returns a boolean result.

Function Details

request/2

request(Service, Data) -> Result

Sends a request to the specified CAPTCHA service and returns the response.

start/0

start() -> ok | {error, term()}

Starts the application along with its dependent applications.

verify/2

verify(Service, Data) -> Result

Verifies the CAPTCHA response from the specified service and returns a boolean result.


Generated by EDoc