JWT structure: header, payload, and signature
A JSON Web Token (RFC 7519) consists of three dot-separated Base64URL segments:
header.payload.signature // Example Base64URL token string: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.Vx4Ypnk5FjmF_UJOy2mQW3eQhHI9xyfe3mBG0OGTGCU
- Header: Contains metadata such as the signing algorithm (alg), token type (typ), and optional key ID (kid)
- Payload: Contains application claims, user context, and token metadata
- Signature: Used by a verifier to check token integrity and authenticity