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

Resource owner authorization

Link to this section Summary

Functions

Authorize the resource owner corresponding to the given params.

Link to this section Functions

Link to this function

authorize(arg1)

View Source
authorize(
  [{:id, String.t()}]
  | [email: String.t(), password: String.t()]
  | [{:resource_owner, struct()}]
) ::
  {:error,
   %Boruta.Oauth.Error{
     error: :invalid_resource_owner,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     status: :unauthorized
   }}
  | {:ok, user :: struct()}

Authorize the resource owner corresponding to the given params.

Examples

iex> authorize(id: "id")
{:ok, %User{...}}