Boruta.Oauth.Authorization protocol (Boruta core v1.2.0) View Source

Link to this section Summary

Functions

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

Creates and returns a token 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()}
  | {:error, reason :: term()}
  | {:error, Boruta.Oauth.Error.t()}

Creates and returns a token for given request, depending of implementation.