authenticator v0.1.0 Authenticator behaviour

Link to this section Summary

Link to this section Types

Link to this type reason()
reason() :: atom()
Link to this type resource()
resource() :: any()
Link to this type token()
token() :: String.t()

Link to this section Callbacks

Link to this callback authenticate(token)
authenticate(token()) :: {:ok, resource()} | {:error, reason()}
Link to this callback fallback(conn, reason)
fallback(conn :: Plug.Conn.t(), reason()) :: Plug.Conn.t()
Link to this callback tokenize(resource)
tokenize(resource()) :: {:ok, token()} | {:error, reason()}