Boruta.Oauth.Codes behaviour (Boruta core v1.2.0) View Source

Code context

Link to this section Summary

Callbacks

Persists a token according to given params.

Returns a Boruta.Oauth.Token by value and redirect_uri.

Link to this section Callbacks

Specs

create(
  params :: %{
    client: Boruta.Oauth.Client.t(),
    sub: String.t(),
    redirect_uri: String.t(),
    scope: String.t(),
    state: String.t(),
    code_challenge: String.t(),
    code_challenge_method: String.t()
  }
) :: code :: Boruta.Oauth.Token.t() | {:error, reason :: term()}

Persists a token according to given params.

Specs

get_by(params :: [value: String.t(), redirect_uri: String.t()]) ::
  token :: Boruta.Oauth.Token | nil

Returns a Boruta.Oauth.Token by value and redirect_uri.