View Source Boruta.Oauth.Authorization.AccessToken (Boruta core v2.2.0)
Check against given params and return the corresponding access token
Link to this section Summary
Functions
Authorize the access token corresponding to the given params.
Link to this section Functions
@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{ client: term(), code_challenge: term(), code_challenge_hash: term(), code_challenge_method: term(), expires_at: term(), inserted_at: term(), nonce: term(), redirect_uri: term(), refresh_token: term(), refresh_token_revoked_at: 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
Examples
iex> authorize(%{value: "value"})
{:ok, %Boruta.Oauth.Token{...}}