plug_mishka_auth v0.0.2 MishkaAuth.Helper.Captcha.Google View Source

Link to this section Summary

Link to this section Types

Specs

provider() :: atom()

Specs

remoteip() :: String.t()

Specs

response() :: String.t()

Specs

secret() :: String.t()

Link to this section Functions

Specs

google_converter(any()) ::
  {:error, :google_response, :unexpected_error_or_not_active}
  | {:error, :captcha_verify, :google, any()}
  | {:ok, :captcha_verify, :google, map()}
Link to this function

google_response(response)

View Source

Specs

google_response(any()) ::
  {:error, :google_response, any()} | {:ok, :google_response, map()}
Link to this function

google_sender(response, remoteip, secret)

View Source

Specs

google_sender(response(), remoteip(), secret()) ::
  {:error, HTTPoison.Error.t()}
  | {:ok,
     %{
       :__struct__ => HTTPoison.AsyncResponse | HTTPoison.Response,
       optional(:body) => any(),
       optional(:headers) => [any()],
       optional(:id) => reference(),
       optional(:request) => HTTPoison.Request.t(),
       optional(:request_url) => any(),
       optional(:status_code) => integer()
     }}
Link to this function

verify(response, remoteip, secret)

View Source

Specs

verify(response(), remoteip(), secret()) ::
  {:error, :google_response, :unexpected_error_or_not_active}
  | {:error, :captcha_verify, :google, any()}
  | {:ok, :captcha_verify, :google, map()}