Centralized JWT verification with alg / iss / aud / typ pinning.
The verifier:
kid
typ
jwtVerify
algorithms
issuer
audience
iat <= now + clockSkewMs
iat
azp
nonce
On any failure the verifier throws JwtVerificationError with a stable JwtVerificationReason. Callers map that to their own error envelope (e.g. RFC 6749 error: "invalid_token").
error: "invalid_token"
Centralized JWT verification with alg / iss / aud / typ pinning.
The verifier:
kidandtyp,typagainst the expected value (legacy compat is opt-in via JwtVerifyOptions.legacyTypAccept),kidvia KeyStore.getVerificationKey (falls back to the current signing kid when the JWT has nokidheader),jwtVerifywith explicitalgorithms,issuer, andaudienceoptions — pinning all three at the security-critical layer,iat <= now + clockSkewMspost-signature (jose does not validateiat-in-future by default), andazp/nonceclaim bindings post-signature.On any failure the verifier throws JwtVerificationError with a stable JwtVerificationReason. Callers map that to their own error envelope (e.g. RFC 6749
error: "invalid_token").