View Source Boruta.Oauth.Authorization.Client (Boruta core v3.0.0-beta.2)

Check against given params and return the corresponding client

Summary

Functions

Authorize the client corresponding to the given params.

Functions

@spec authorize(
  [id: String.t(), source: map(), grant_type: String.t()]
  | [
      id: String.t(),
      source: map() | nil,
      redirect_uri: String.t(),
      grant_type: String.t()
    ]
  | [
      id: String.t(),
      source: map() | nil,
      grant_type: String.t(),
      code_verifier: String.t()
    ]
  | [
      id: String.t(),
      source: map() | nil,
      redirect_uri: String.t(),
      grant_type: String.t(),
      code_verifier: String.t()
    ]
) :: {:ok, Boruta.Oauth.Client.t()} | {:error, Boruta.Oauth.Error.t()}

Authorize the client corresponding to the given params.

Examples

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