Backplane.Oauth.Authorization.AccessToken (backplane_oauth v1.10.77)

Copy Markdown 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,
   %Backplane.Oauth.Error{
     error: :invalid_access_token | :invalid_grant,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     state: term(),
     status: :bad_request
   }}
  | {:ok, Backplane.Oauth.Token.t()}

Authorize the access token corresponding to the given params.

Examples

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