TOPIC 04/1918 MINNOT STARTED

OAuth, JSON Web Token (JWT) and tokens for testers

A token is like a hotel key card. Learn who hands it out, what it says, when it ends and which doors it opens. Then learn what a tester must never paste into a ticket.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a hotel key card. The hotel checks who you are, then gives you a card for particular doors and a limited stay. The door still has to decide whether to accept it.

Daily List is a to-do list app. Lily wants it to read her calendar. The calendar service asks her to approve that access without giving Daily List her calendar password. Daily List receives a token, a credential for the allowed requests.

Tom asks who issued it, what access it grants, which service should accept it and when it stops being valid. These are separate questions: a real card for the wrong hotel should not open a door.

OAuth describes how access can be granted. A is one possible way to carry claims; not every OAuth token has that format. OpenID Connect adds a standard identity layer when the app also needs to verify who signed in.

The analogy has a limit. Tokens can expire and systems can support revocation or other checks that stop their use earlier. Logging out of one app does not by itself tell us what happened to every token.

Kept simple: Daily List, Lily, Tom and the calendar connection are fictional training examples. No real token is needed.

PLAIN WORDS · 2 in this section
credential
proof of who you are or what you may do
revocation
the act of officially withdrawing something given earlier

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Understanding who hands out a token, what it says, when it ends and which things it may do.

  1. Who issued it
  2. What it says
  3. When it ends
  4. What it opens
Who gave it, what it says, when it ends, what it opens

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The hotel deskThe authorization server
The key cardThe token
The doors the card opensThe token scope
The last day of the stayThe expiry time

WHERE THIS PICTURE STOPS

  • Tokens may expire, be revoked or become unusable under server policy; logout and revocation are not automatically the same operation.
  • Signed compact JWS claims are readable; encrypted compact JWE and opaque access tokens need different handling.
  • A hotel has one desk. OAuth has four roles.

HOOK

Who gave it, what it says, when it ends, what it opens.

REMEMBER IT THIS WAY

A contrast: two neighbours told apart by one test.

Issuer, expiry, audience, scope.

What each part of the trick stands for
In the trickWhat it stands for
IssuerThe issuer required by the profile
ExpiryThe expiry time
AudienceThe intended recipient
ScopeThe permitted operations

TELL A FRIEND

A hotel key card. The desk checks you and gives a card that opens some doors, until a date.

OFTEN MIXED UP WITH API log-in and permissions. The earlier lesson covers refusals such as unauthorised and forbidden. This lesson reads the token itself and the flow that creates it.

Sources & standards — 9 sources
  1. Market practice

    RFC 6749: The OAuth 2.0 Authorization Framework ↗ — Internet Engineering Task Force · October2012§1.1 roles,§2.3 client authentication,§3.3 scope and§4.1 original Figure3/code exchange; actual text read6 November2026.

    Defines four roles (resource owner, client, authorization server, resource server) and the scope parameter, and says a client should ask for the least scope it needs. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 6749, October 2012. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§1.1 roles,§2.3 client authentication,§3.3 scope and§4.1 Figure3/code exchange read. Client credentials can use configured passwords or key-based methods. Current security updates are identified separately.

  2. Market practice

    The OAuth 2.0 Authorization Framework: Bearer Token Usage (Request for Comments 6750) ↗ — IETF · October2012§1.2/§1.3 bearer semantics and§2.1 Authorization header; actual text read6 November2026.

    Per the search excerpt, a Proposed Standard from October 2012. A bearer token goes in the Authorization header with the word Bearer, whoever holds it can use it, and so it must be protected. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 6750, October 2012. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§1.2 bearer meaning,§1.3 overview and§2.1 Authorization request header read. Bearer possession does not require a separate proof-of-possession key; other token designs may bind the sender.

  3. Market practice

    RFC 7519: JSON Web Token (JWT) ↗ — Internet Engineering Task Force · May2015§3 and§4.1 registered claims; base requirements versus application-profile requirements; actual text read6 November2026.

    Defines the token as claims in a JavaScript Object Notation (JSON) object and the registered claim names iss, sub, aud, exp, nbf, iat and jti. The exp claim gives a time on or after which the token must not be accepted. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 7519, May 2015. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§3 overview and§4.1 registered claims through iat read. JWS/JWE/nesting differ; registered claims are not all mandatory in the base specification but profiles can require them.

  4. Market practice

    RFC7515: JSON Web Signature (May2015) ↗ — IETF · May2015§3.1 three-part compact JWS; actual text read6 November2026.

    Section3.1 compact JWS representation: protected header, payload and signature; encoding is not signature verification. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  5. Market practice

    RFC7516: JSON Web Encryption (May2015) ↗ — IETF · May2015§3.1 five-part compact JWE; actual text read6 November2026.

    Section3.1 encrypted compact JWE representation has five parts. JWT does not imply that every token is an unencrypted, three-part JWS. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  6. Market practice

    RFC 8725: JSON Web Token Best Current Practices ↗ — Internet Engineering Task Force · February2020 entire§3 best practices: algorithm/key policy, verification, issuer/audience and distinct token rules; actual text read6 November2026.

    Best current practice document that updates Request for Comments (RFC) 7519 and gives advice on secure use, including checking the algorithm (section 3.1) and using appropriate algorithms (section 3.2). Only the table of contents was seen. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 8725, February 2020 (BCP 225). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual entire§3 validation-practice subsections read: trusted algorithm/key policy, cryptographic checks, issuer/audience and distinct rules for token kinds. Unsigned-token policy is context-sensitive; the authenticated training profile rejects it.

  7. Market practiceBCP 240, January 2025

    RFC 9700: Best Current Practice for OAuth 2.0 Security ↗ — IETF / OpenID Foundation · RFC9700 January2025§2.1–2.2,§2.4 and§4.7: PKCE, CSRF protection, redirects, grant guidance and sender constraints; actual sections read6 November2026.

    OAuth security practice, including sender-constrained access tokens in §4.10.1; RFC6750 and OIDC Core are separate cited sources. · Checked 2026-11-06

    Primary-source scope and access recorded in v12-ba-technical-audit-20261106.md. Advisory practice unless the cited instrument and its applicability establish a requirement.

    V34 review, 6 November 2026: Actual RFC9700 January2025§2.1–2.2,§2.4 and§4.7 read for current OAuth security: public-client PKCE required, confidential recommended; CSRF binding conditions, redirect exception and modern grant guidance.

  8. Market practice

    RFC7009: OAuth2.0 Token Revocation (August2013) ↗ — IETF · August2013 revocation requirements, response and implementation note: distinguish expiry/logout and self-contained/reference-token checks; actual sections read6 November2026.

    Revocation requirements, response semantics and implementation tradeoffs for self-contained versus reference tokens. Revocation, logout and expiry are different events. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  9. Market practiceOpenID ConnectCore 1.0 incorporatingerrata set 2,15December2023

    OpenID ConnectCore 1.0 incorporatingerrata set 2,15December2023 ↗ — OpenID Foundation · Core1.0 incorporating errata set2,15December2023 abstract/introduction and§2 ID-token purpose; actual sections read6 November2026.

    Opened definition of identity layer/authentication on topofOAuth2.0; access token is not an ID token. · Checked 2026-11-06

    Primary text read6November2026; see domain audit for scope and limits.

    V34 review, 6 November 2026: Actual OpenID Connect Core1.0 incorporating errata set2,15December2023 abstract/introduction and§2 ID-token purpose read. OpenID Connect adds identity/authentication to OAuth; ID-token and access-token purposes differ.

PRACTISE AND KEEP

Sources for this topic — 13 sources
  1. Market practice

    RFC 6749: The OAuth 2.0 Authorization Framework ↗ — Internet Engineering Task Force · October2012§1.1 roles,§2.3 client authentication,§3.3 scope and§4.1 original Figure3/code exchange; actual text read6 November2026.

    Defines four roles (resource owner, client, authorization server, resource server) and the scope parameter, and says a client should ask for the least scope it needs. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 6749, October 2012. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§1.1 roles,§2.3 client authentication,§3.3 scope and§4.1 Figure3/code exchange read. Client credentials can use configured passwords or key-based methods. Current security updates are identified separately.

  2. Market practice

    RFC 7519: JSON Web Token (JWT) ↗ — Internet Engineering Task Force · May2015§3 and§4.1 registered claims; base requirements versus application-profile requirements; actual text read6 November2026.

    Defines the token as claims in a JavaScript Object Notation (JSON) object and the registered claim names iss, sub, aud, exp, nbf, iat and jti. The exp claim gives a time on or after which the token must not be accepted. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 7519, May 2015. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§3 overview and§4.1 registered claims through iat read. JWS/JWE/nesting differ; registered claims are not all mandatory in the base specification but profiles can require them.

  3. Market practice

    RFC 8725: JSON Web Token Best Current Practices ↗ — Internet Engineering Task Force · February2020 entire§3 best practices: algorithm/key policy, verification, issuer/audience and distinct token rules; actual text read6 November2026.

    Best current practice document that updates Request for Comments (RFC) 7519 and gives advice on secure use, including checking the algorithm (section 3.1) and using appropriate algorithms (section 3.2). Only the table of contents was seen. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments 8725, February 2020 (BCP 225). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual entire§3 validation-practice subsections read: trusted algorithm/key policy, cryptographic checks, issuer/audience and distinct rules for token kinds. Unsigned-token policy is context-sensitive; the authenticated training profile rejects it.

  4. Market practice

    OAuth 2.0 authentication vulnerabilities (PortSwigger Web Security Academy) ↗ — PortSwigger · The state value works like an anti-forgery token and redirect addresses should be matched exactly against a registered list (search excerpt, page not opened)

    Says the state parameter works like an anti-CSRF token, that a missing state is a warning sign, and that providers should match redirect addresses exactly against a registered list. Vendor teaching site, free. Practitioner or vendor guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    JSON Web Token for Java Cheat Sheet (Open Worldwide Application Security Project) ↗ — Open Worldwide Application Security Project · Common token weaknesses include token sidejacking and client-side storage (search excerpt, page not opened)

    Covers common token weaknesses, including token sidejacking (a stolen token used to impersonate the user), and client-side storage. Only a part of the page was seen. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    The OAuth 2.0 Authorization Framework: Bearer Token Usage (Request for Comments 6750) ↗ — IETF · October2012§1.2/§1.3 bearer semantics and§2.1 Authorization header; actual text read6 November2026.

    Per the search excerpt, a Proposed Standard from October 2012. A bearer token goes in the Authorization header with the word Bearer, whoever holds it can use it, and so it must be protected. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 6750, October 2012. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    V34 review, 6 November 2026: Actual§1.2 bearer meaning,§1.3 overview and§2.1 Authorization request header read. Bearer possession does not require a separate proof-of-possession key; other token designs may bind the sender.

  7. Market practice

    Multifactor Authentication Cheat Sheet (OWASP) ↗ — Open Worldwide Application Security Project · Guidance on testing and building multi-factor sign-in (search excerpt, page not opened)

    Defines multifactor authentication, factor types, and advice on one-time password lifetime, single use and attempt limits. Practitioner guidance, not a standard. · Checked 2026-11-08

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

    8 November2026 bounded primary update: 8November2026 actual OWASPMFA Intro/factorindependence,OTPHandling/Storage,riskbasedauth and ResettingMFA selectedsections read. Context-specific lifecycle/recovery; no jurisdiction/compliance or fullpage claim.

  8. Market practice

    What is OAuth 2 (Auth0) ↗ — Auth0 · RFC 6749 (already in registry) defines both grants. Auth0 'What is OAuth 2' (search excerpt, page not opened).

    Authorization code and client credentials grants. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  9. Market practice

    RFC7515: JSON Web Signature (May2015) ↗ — IETF · May2015§3.1 three-part compact JWS; actual text read6 November2026.

    Section3.1 compact JWS representation: protected header, payload and signature; encoding is not signature verification. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  10. Market practice

    RFC7516: JSON Web Encryption (May2015) ↗ — IETF · May2015§3.1 five-part compact JWE; actual text read6 November2026.

    Section3.1 encrypted compact JWE representation has five parts. JWT does not imply that every token is an unencrypted, three-part JWS. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  11. Market practiceBCP 240, January 2025

    RFC 9700: Best Current Practice for OAuth 2.0 Security ↗ — IETF / OpenID Foundation · RFC9700 January2025§2.1–2.2,§2.4 and§4.7: PKCE, CSRF protection, redirects, grant guidance and sender constraints; actual sections read6 November2026.

    OAuth security practice, including sender-constrained access tokens in §4.10.1; RFC6750 and OIDC Core are separate cited sources. · Checked 2026-11-06

    Primary-source scope and access recorded in v12-ba-technical-audit-20261106.md. Advisory practice unless the cited instrument and its applicability establish a requirement.

    V34 review, 6 November 2026: Actual RFC9700 January2025§2.1–2.2,§2.4 and§4.7 read for current OAuth security: public-client PKCE required, confidential recommended; CSRF binding conditions, redirect exception and modern grant guidance.

  12. Market practice

    RFC7009: OAuth2.0 Token Revocation (August2013) ↗ — IETF · August2013 revocation requirements, response and implementation note: distinguish expiry/logout and self-contained/reference-token checks; actual sections read6 November2026.

    Revocation requirements, response semantics and implementation tradeoffs for self-contained versus reference tokens. Revocation, logout and expiry are different events. · Checked 2026-11-06

    Actual relevant RFC sections read from the official RFC Editor plain text for V34 Security analysis. The date and scope identify the edition; surrounding lessons distinguish framework definitions, token profiles and current security guidance. No live token was created or used.

  13. Market practiceOpenID ConnectCore 1.0 incorporatingerrata set 2,15December2023

    OpenID ConnectCore 1.0 incorporatingerrata set 2,15December2023 ↗ — OpenID Foundation · Core1.0 incorporating errata set2,15December2023 abstract/introduction and§2 ID-token purpose; actual sections read6 November2026.

    Opened definition of identity layer/authentication on topofOAuth2.0; access token is not an ID token. · Checked 2026-11-06

    Primary text read6November2026; see domain audit for scope and limits.

    V34 review, 6 November 2026: Actual OpenID Connect Core1.0 incorporating errata set2,15December2023 abstract/introduction and§2 ID-token purpose read. OpenID Connect adds identity/authentication to OAuth; ID-token and access-token purposes differ.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.