Newnessimworks.com
Glossary · Web development

JSON Web Token (JWT)

A self-contained, signed token format used for authentication and authorization — common in stateless APIs.

Definition

In long form.

A JWT has three parts (header, payload, signature) joined by dots and base64-encoded. The payload contains claims like user ID, role, expiration. The signature, computed with a secret or RSA key, lets the server verify the token without a database lookup — making JWTs convenient for stateless authentication. Caveats: JWT payloads are not encrypted by default, just signed (anyone can read them); revocation is hard (you can't invalidate a stateless token short of expiration); short expiry plus refresh-token rotation is best practice.

In context

JWTs are the right fit for service-to-service authentication and for browser sessions where you want to verify in middleware (e.g. at the edge) without a database call. For long-lived browser sessions, server-side sessions backed by Redis are often simpler and more revokable.

Discovery first

Talk to us about your engagement.

Discovery calls are free. Scope, timelines, and pricing are quoted after we understand what you’re solving.