AshVault.Macaroon.Verified (AshVault v0.2.0)

Copy Markdown View Source

What a verified macaroon proved, attached to the loaded record as the :macaroon metadata (record.__metadata__.macaroon), alongside using_macaroon?: true.

caveats is every caveat the token carried, in chain order, as {name, value} with name an atom from the macaroon's declaration (or :expires_at). authorize_caveats is the subset whose phase: :authorize checks have not run yet — they are enforced by AshVault.Checks.MacaroonAllows at authorization time.

It carries no token bytes and no signature.

Summary

Types

t()

@type t() :: %AshVault.Macaroon.Verified{
  authorize_caveats: [{atom(), term()}],
  caveats: [{atom(), term()}],
  expires_at: DateTime.t() | nil,
  id: binary(),
  key_version: pos_integer(),
  macaroon: atom(),
  resource: module(),
  scope: binary()
}