defmodule Pleroma.Captcha.Service do
-
@doc """
Request new captcha from a captcha service.
`true` if captcha is valid, `false` if not
"""
- @callback validate(token :: String.t, captcha :: String.t) :: boolean
+ @callback validate(token :: String.t(), captcha :: String.t()) :: boolean
+
+ @doc """
+ This function is called periodically to clean up old captchas
+ """
+ @callback cleanup() :: :ok
end