Module lessons (3/3)
OIDC id_token Claims: iss, aud & nonce
Exploit cross-application OIDC audience confusion and implement a strict fail-closed issuer, audience, azp, nonce, and expiry verifier.
What you'll learn in this lesson
- Distinguish OAuth 2 Access Tokens (API authorization) from OIDC ID Tokens (authentication claims for your specific
client_id). - Prevent Cross-App Token Confusion, JWKS header injection (
jku/x5u/alg: none), and Replay Attacks caused by skippingiss,aud,azp, or single-usenonce. - Build a hardened end-to-end OIDC authenticator verifying header algorithms, claims, and single-use
noncetracking.
Overview
Validating a cryptographic RS256 or ES256 signature only proves which Identity Provider minted the JWT — not that the token is an id_token intended for your application or issued during this fresh login attempt.
Inspect these four examples comparing token confusion against full RFC 7519 / OIDC Core validation:
Sections covered in this lesson
- 11. Header Pinning, Audience Arrays & Single-Use Nonces
- 22. Interactive Explorer: Cross-App Token Confusion Lab
- 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
- 44. Checkpoints & Code Review
Unlock "OIDC id_token Claims: iss, aud & nonce" and the full Application & Web Security curriculum
Exploit cross-application OIDC audience confusion and implement a strict fail-closed issuer, audience, azp, nonce, and expiry verifier.
Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Application & Web Security plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.