View Source Boruta.Oauth.Authorization.ResourceOwner (Boruta core v2.3.3)

Check against given params and return the corresponding resource owner

Summary

Functions

Authorize the resource owner corresponding to the given params.

Functions

@spec authorize(
  [email: String.t(), password: String.t()]
  | [{:resource_owner, Boruta.Oauth.ResourceOwner.t()}]
) ::
  {:error,
   %Boruta.Oauth.Error{
     error: :invalid_resource_owner,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     state: term(),
     status: :unauthorized
   }}
  | {:ok, user :: Boruta.Oauth.ResourceOwner.t()}

Authorize the resource owner corresponding to the given params.

Examples

iex> authorize(id: "id")
{:ok, %Boruta.Oauth.ResourceOwner{...}}