Attesto.DeviceCode.Grant (Attesto v0.13.0)

Copy Markdown View Source

The validated context a successfully redeemed device code yields (RFC 8628 §3.4).

Attesto.DeviceCode.redeem/4 returns this once the device code's polling state machine reaches an approved, unexpired, single-use redemption. 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, resource (RFC

  1. the aud, dpop_jkt (when present) the cnf.jkt, and claims carries the authentication/identity context the verification page recorded when the user approved.

Summary

Types

t()

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