On this page5 sections
ReferenceIntermediate4-6 min reference

JWT Claims & Safe QA Checks

A JWT (JSON Web Token) is three base64url parts — header.payload.signature — joined by dots. The payload is encoded, not encrypted: anyone can read it, so it must never contain secrets. This sheet covers the standard claims and the checks QA can run safely. Token forgery and signature attacks belong in authorized security testing (linked below).

Anatomy

PartContains
Headeralg (signing algorithm, e.g. RS256), typ: JWT
PayloadThe claims (see below)
SignatureVerifies the token wasn't tampered with — checked by the server, not the client

Standard (registered) claims

ClaimMeaningQA check
issIssuerMatches your auth server
subSubject (user/entity id)Identifies the right user
audAudienceMatches your API
expExpiry (epoch seconds)In the future; expired ⇒ 401
nbfNot beforeToken isn't accepted early
iatIssued atSane timestamp
jtiToken idUnique; supports revocation

What QA can safely verify

  • Decode the payload (e.g. with the JWT decoder utility) and assert sub, aud, iss, and scopes/roles are correct.
  • An expired token (exp in the past) is rejected with 401.
  • A token for one user cannot access another user's data.
  • The token is sent as Authorization: Bearer … over HTTPS and never appears in logs or URLs.
  • alg is an expected algorithm — flag alg: none to the security team (don't exploit it yourself).

When to use

Asserting identity/role claims in API tests, or reviewing an auth flow. For signature, alg:none, and tampering tests, use authorized security testing — see the link below.

Common mistakes

  • Treating the payload as secret — it's readable by anyone holding the token.
  • Validating only that a token exists, not that its claims are correct.
  • Ignoring exp/nbf, so expiry and clock-skew bugs slip through.
  • Logging full tokens in test output or CI artifacts.

// Related resources

Security Testing

Tools & Utilities

Glossary

Related cheat sheets