Boruta.Oauth.Authorization.AccessToken (Boruta core v3.0.0-beta.4)

View Source

Check against given params and return the corresponding access token

Summary

Functions

Authorize the access token corresponding to the given params.

Functions

authorize(list)

@spec 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,
     state: term(),
     status: :unauthorized
   }}
  | {:ok,
     %Boruta.Oauth.Token{
       agent_token: term(),
       authorization_details: term(),
       bind_configuration: term(),
       bind_data: term(),
       c_nonce: term(),
       client: term(),
       code_challenge: term(),
       code_challenge_hash: term(),
       code_challenge_method: term(),
       expires_at: term(),
       id: term(),
       inserted_at: term(),
       nonce: term(),
       presentation_definition: term(),
       previous_code: term(),
       public_client_id: term(),
       redirect_uri: term(),
       refresh_token: term(),
       refresh_token_revoked_at: term(),
       resource_owner: term(),
       revoked_at: term(),
       scope: term(),
       state: term(),
       sub: term(),
       tx_code: term(),
       type: term(),
       value: term()
     }}

Authorize the access token corresponding to the given params.

Examples

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