Expand description
The single RS256 decode primitive shared by every JWT validation path.
Request-context middleware, session validation, hook-token validation, and
the OAuth/MCP/agent domains all route through decode_rs256_claims. The
kid lookup, RS256 enforcement, and the exp/nbf/issuer/audience policy
live here and nowhere else, so the validators cannot drift apart. The only
per-call knob is ValidationPolicy.
Federated subject-token verification (token-exchange) is deliberately not a caller: it resolves keys from an external issuer’s JWKS rather than this deployment’s signing authority, so it is a genuinely different operation.
Structs§
- Validation
Policy - The claim checks applied on top of the always-on signature, RS256, and
kidenforcement. An emptyaudiencesslice disables theaudcheck.
Constants§
- JWT_
LEEWAY_ SECONDS - Clock-skew tolerance (seconds) for
exp/nbf/iat. Pinned explicitly so deployments see the value in review rather than inheriting thejsonwebtokendefault.