token expiry
The time after which a token must no longer be accepted, carried in a JSON Web Token as the exp claim.
In more detail
Short lifetimes limit the damage of a leak. Verifiers must check expiry, allowing only a small margin for clock differences, and a signing key can be retired once every token it signed has expired.
Related terms
- JSON Web Token — A compact signed token made of three base64url parts separated by dots: a header, a payload of claims and a signature.
- claim — One statement inside a token, as a name and value, such as sub (subject), exp (expiry), iss (issuer), aud (audience) or scope.
- key rotation — Replacing a password or key with a new one on a schedule or after a suspected leak, and re-encrypting what it protected.
- refresh token — A longer-lived credential a client uses to get a new short-lived access token without asking the user to log in again.
Taught in
- Basic Auth, Tokens And Sessions — Modern API Architecture: REST, GraphQL & gRPC
- JSON Web Tokens — Modern API Architecture: REST, GraphQL & gRPC
- Scopes And Key Rotation — Modern API Architecture: REST, GraphQL & gRPC