Attesto.AuthorizationCode.Grant (Attesto v0.5.0)

Copy Markdown View Source

The validated context a successfully redeemed authorization code yields.

Attesto.AuthorizationCode.redeem/4 returns this struct once the code's expiry, redirect URI, PKCE verifier, and DPoP binding have all checked out. The host reads it to mint the access token (and, if it issues one, the refresh token): subject and scope become the token's sub and scope, dpop_jkt (when present) becomes the access token's cnf.jkt, and claims carries any host context that rode along from the authorization request.

Summary

Types

t()

@type t() :: %Attesto.AuthorizationCode.Grant{
  claims: map(),
  client_id: String.t(),
  dpop_jkt: String.t() | nil,
  redirect_uri: String.t(),
  scope: [String.t()],
  subject: String.t()
}