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

Access token authorization

Link to this section Summary

Functions

Authorize the access token corresponding to the given params.

Link to this section Functions

Specs

authorize(params :: [{:value, String.t()}] | [{:refresh_token, String.t()}]) ::
  {:error,
   %Boruta.Oauth.Error{
     error: :invalid_access_token,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     status: :unauthorized
   }}
  | {:ok,
     %Boruta.Oauth.Token{
       client: term(),
       code_challenge: term(),
       code_challenge_hash: term(),
       code_challenge_method: term(),
       expires_at: term(),
       id: term(),
       inserted_at: term(),
       redirect_uri: term(),
       refresh_token: term(),
       resource_owner: term(),
       revoked_at: term(),
       scope: term(),
       state: term(),
       sub: term(),
       type: term(),
       value: term()
     }}

Authorize the access token corresponding to the given params.

Examples

iex> authorize(%{value: "value"})
{:ok, %Boruta.Oauth.Token{...}}