Verification policy for signed authorization request objects (JAR, RFC 9101).
Policy expressed as data the caller passes to
Attesto.AuthorizationRequest.validate/2, which threads it into
Attesto.RequestObject.verify/3. The default %Policy{} is the generic
OpenID Connect §6.1 / RFC 9101 baseline (a signed request object is verified,
but nbf/exp/typ are not required). The FAPI 2.0 Message Signing §5.3.1
profile is the named fapi_message_signing/0 constructor - profile data, not
a feature flag and not a backwards-compatibility shim.
Summary
Functions
The FAPI 2.0 Message Signing §5.3.1 profile for signed request objects
The generic OpenID Connect §6.1 / RFC 9101 baseline: a signed request object
is verified, but nbf/exp/typ are not required. Equivalent to %Policy{}.
Flatten the policy to Attesto.RequestObject.verify/3 options, dropping nil
values so verify/3 keeps its own defaults (notably accepted_algs, which
defaults to Attesto.SigningAlg.fapi_algs/0).
Types
@type t() :: %Attesto.RequestObject.Policy{ accepted_algs: [Attesto.SigningAlg.alg()] | nil, accepted_typ: [String.t() | nil] | nil, max_lifetime_seconds: pos_integer() | nil, max_nbf_age_seconds: pos_integer() | nil, require_exp: boolean(), require_nbf: boolean() }
Functions
@spec fapi_message_signing() :: t()
The FAPI 2.0 Message Signing §5.3.1 profile for signed request objects:
nbfREQUIRED, no more than 60 minutes in the past;expREQUIRED, no more than 60 minutes afternbf;- JOSE header
typmust be"oauth-authz-req+jwt".
accepted_algs is left nil to inherit Attesto.RequestObject.verify/3's
default (Attesto.SigningAlg.fapi_algs/0: PS256, ES256, EdDSA).
Note: pinning typ to exactly "oauth-authz-req+jwt" (rejecting an absent or
other typ) is stricter than §5.3.1's literal "shall accept that typ"; it is
the RFC 9101 §10.8 explicit-typing defence against cross-JWT confusion, and is
what the FAPI conformance suite exercises. A deployment wanting the softer
reading can build a %Policy{} with accepted_typ: ["oauth-authz-req+jwt", nil].
@spec generic() :: t()
The generic OpenID Connect §6.1 / RFC 9101 baseline: a signed request object
is verified, but nbf/exp/typ are not required. Equivalent to %Policy{}.
Flatten the policy to Attesto.RequestObject.verify/3 options, dropping nil
values so verify/3 keeps its own defaults (notably accepted_algs, which
defaults to Attesto.SigningAlg.fapi_algs/0).