JWT claims and serialization forms

JSON Web Token (JWT, RFC 7519) is a compact format for representing claims between parties. Base64URL encoding is not encryption: a signed JWS payload remains readable unless a separate confidentiality mechanism is used. Use an encrypted form such as JWE when claim confidentiality is required. JWT itself is neither an authentication protocol nor a guarantee of stateless sessions; the surrounding protocol and application determine what claims mean and how they are validated.

The familiar three-part header.payload.signature form is JWS Compact Serialization. JWTs can be signed JWS objects, encrypted JWE objects, or (in constrained contexts) unsecured representations, so not every JWT has three parts. Names such as iss, sub, aud, exp, nbf, iat, and jti are registered claims; RFC 7519 does not require all of them in every token. A signature can help detect changes and verify possession of a signing key only after a verifier checks it against the expected key and algorithm.

Expert perspective: signature verification and session policy are separate

IETF RFC 8725, authored by Yaron Sheffer, David Hardt, Michael Jones, and other contributors, is a Best Current Practice for secure JWT implementation. It calls for verification libraries and applications to constrain acceptable algorithms and validate tokens in their intended context. In a 2025 Auth0 article, Principal Security Engineer Maria Vasilevskaya discusses the exposure window of self-contained access tokens and controls such as short lifetimes, back-channel logout, and sender-constrained tokens. That is an identity-provider perspective and describes mechanisms that are not available in every JWT deployment.

A token format does not imply authentication, encryption, or statelessness

JWT is a claims format. A signed JWS payload is Base64URL-encoded, not secret; use an encrypted form such as JWE when confidentiality is required. JWTs can be signed, encrypted, or unsecured, and the familiar three-part form describes JWS Compact Serialization rather than every JWT representation. Registered claims are not all mandatory. A valid signature alone does not establish that the token is appropriate for a user, API, or permission. Verify the expected algorithm and key use, signature, issuer, audience, time claims, and application authorization. Stateless verification can avoid a session lookup, but it also makes immediate revocation a deployment concern: deny lists, session state, token introspection, or provider-specific logout mechanisms add state and operational trade-offs. Do not treat refresh-token rotation or SameSite=Strict cookies as universal JWT requirements.

References and Source Links