Boruta core v0.1.0-rc.4 Boruta.Oauth.Authorization.Code View Source

Code authorization

Link to this section Summary

Functions

Authorize the code corresponding to the given params.

Link to this section Functions

Link to this function

authorize(map)

View Source
authorize(%{value: String.t(), redirect_uri: String.t()}) ::
  {:error,
   %Boruta.Oauth.Error{
     error: :invalid_code,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     status: :bad_request
   }}
  | {:ok,
     %Boruta.Oauth.Token{
       client: term(),
       expires_at: term(),
       id: term(),
       inserted_at: term(),
       redirect_uri: term(),
       refresh_token: term(),
       resource_owner: term(),
       scope: term(),
       state: term(),
       type: term(),
       value: term()
     }}

Authorize the code corresponding to the given params.

Examples

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