OAuth requests authorization
Summary
Functions
Checks if request is valid for token creation for given request, depending of implementation.
Creates and returns tokens for given request, depending of implementation.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec preauthorize(request :: any()) :: {:ok, Backplane.Oauth.AuthorizationSuccess.t()} | {:error, Backplane.Oauth.Error.t()}
Checks if request is valid for token creation for given request, depending of implementation.
@spec token(request :: any()) :: {:ok, Backplane.Oauth.Token.t() | %{ required(type :: :code | :token | :id_token) => token :: Backplane.Oauth.Token.t() | String.t() }} | {:error, reason :: term()} | {:error, Backplane.Oauth.Error.t()}
Creates and returns tokens for given request, depending of implementation.