mirror of
https://github.com/jtomchak/akkoma.git
synced 2025-01-21 07:06:08 +01:00
25 lines
501 B
Elixir
25 lines
501 B
Elixir
|
defmodule Pleroma.Captcha.Service do
|
||
|
|
||
|
@doc """
|
||
|
Request new captcha from a captcha service.
|
||
|
|
||
|
Returns:
|
||
|
|
||
|
Service-specific data for using the newly created captcha
|
||
|
"""
|
||
|
@callback new() :: map
|
||
|
|
||
|
@doc """
|
||
|
Validated the provided captcha solution.
|
||
|
|
||
|
Arguments:
|
||
|
* `token` the captcha is associated with
|
||
|
* `captcha` solution of the captcha to validate
|
||
|
|
||
|
Returns:
|
||
|
|
||
|
`true` if captcha is valid, `false` if not
|
||
|
"""
|
||
|
@callback validate(token :: String.t, captcha :: String.t) :: boolean
|
||
|
end
|