Authorization for a Sake endpoint: the host app is the OAuth 2.1 authorization server, and the endpoint is the resource server.
Configure it on the Sake child (see Sake.child_spec/1) and mount the
routes with Sake.Router (Phoenix) or Sake.Auth.RouterPlug (Plug).
Summary
Functions
The active grants of a person: one entry per client, for a settings page.
Deletes expired codes and tokens, and the remembered consents older than the refresh token lifetime that no live token family still uses. Schedule it (a cron job, Oban, or a periodic task).
Revokes every token of a client for a person, and forgets every consent of that client for the person.
Functions
@spec config() :: Sake.Auth.Config.t()
@spec list_grants(Sake.Auth.Config.t(), String.t()) :: [map()]
The active grants of a person: one entry per client, for a settings page.
@spec prune(Sake.Auth.Config.t()) :: :ok
Deletes expired codes and tokens, and the remembered consents older than the refresh token lifetime that no live token family still uses. Schedule it (a cron job, Oban, or a periodic task).
@spec revoke_grant(Sake.Auth.Config.t(), String.t(), String.t()) :: :ok
Revokes every token of a client for a person, and forgets every consent of that client for the person.