View Source OmniCaptcha (Omni Captcha v0.0.1)

A module for verifying captcha response strings.

Summary

Functions

Verifies a response string.

Functions

Link to this function

verify(response, options \\ [])

View Source
@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 to OmniCaptcha.Adapter.Sandbox)
  • :http_client - sets the HTTP client used for the verification request (defaults to OmniCaptcha.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")