View Source Boruta.Oauth.Authorization protocol (Boruta core v2.1.5)

OAuth requests authorization

Link to this section 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.

Link to this section Types

Link to this section Functions

Specs

preauthorize(request :: any()) ::
  {:ok, Boruta.Oauth.AuthorizationSuccess.t()}
  | {:error, Boruta.Oauth.Error.t()}

Checks if request is valid for token creation for given request, depending of implementation.

Specs

token(request :: any()) ::
  {:ok,
   Boruta.Oauth.Token.t()
   | %{
       required(type :: :code | :token | :id_token) =>
         token :: Boruta.Oauth.Token.t() | String.t()
     }}
  | {:error, reason :: term()}
  | {:error, Boruta.Oauth.Error.t()}

Creates and returns tokens for given request, depending of implementation.