Boruta.Oauth.AccessTokens behaviour (Boruta core v0.2.1) View Source

Access token context

Link to this section Summary

Link to this section Callbacks

Specs

create(
  params :: %{
    :client => Boruta.Oauth.Client.t(),
    optional(:resource_owner) => struct(),
    optional(:redirect_uri) => String.t(),
    :scope => String.t(),
    optional(:state) => String.t()
  },
  options :: [{:refresh_token, boolean()}]
) :: token :: Boruta.Oauth.Token.t() | {:error, Ecto.Changeset.t()}

Specs

get_by([{:value, String.t()}] | [{:refresh_token, String.t()}]) ::
  token :: Boruta.Oauth.Token.t() | nil

Specs

revoke(token :: Boruta.Oauth.Token.t()) ::
  {:ok, Boruta.Oauth.Token.t()} | {:error, Ecto.Changeset.t()}