View Source OmniCaptcha (Omni Captcha v0.0.2)
A module for verifying captcha response strings.
Summary
Functions
Verifies a response string.
Functions
@spec verify(String.t(), Keyword.t()) :: {:ok, OmniCaptcha.Response.t()} | {:error, [atom()]}
Verifies a response string.
Options
:adapter
- sets the adapter that is used to load related configuration for the provider (defaults toOmniCaptcha.Adapter.Sandbox
):http_client
- sets the HTTP client used for the verification request (defaults toOmniCaptcha.Http
):timeout
- the timeout for the request (defaults to 5000ms):secret
- the secret key used by :omni_captcha (defaults to the secret provided in application config):remoteip
- the IP address of the user (optional and not set by default)
Example
iex> {:ok, api_response} = OmniCaptcha.verify("response_string")