Options for authenticated JWT decoding.
This is the source-compatible configuration value that groups optional parameters instead of adding many positional arguments. Existing call sites that use decode(token,key,alg,clockSkew,issuer) continue to work via the legacy overload which delegates to this options type.
Audience validation follows RFC 7519 ยง4.1.3 receiver contract: when expectedAudience is set, the token's aud claim must be present and contain the expected value (string match for single aud, membership for array aud). Missing aud yields MissingClaim("aud"); mismatch yields InvalidToken.
Value parameters
- backend
-
explicit crypto backend to use for this operation; defaults to JwtCrypto.backend snapshot
- clockSkewSeconds
-
allowable clock skew in seconds for
exp/nbfvalidation - expectedAudience
-
if set, the
audclaim must contain this audience - issuer
-
if set, the
issclaim must match exactly - limits
-
resource limits for token/JSON parsing
- nowSeconds
-
explicit current time in seconds since epoch for
exp/nbfvalidation; defaults toSystem.currentTimeMillis()/1000