A JSON Web Token is a compact format for carrying claims-such as a user identity, permissions, or an expiration time-between systems. A JWT commonly has a header, a claims payload, and a cryptographic signature, encoded into a compact string. Signing can help recipients detect changes, but does not by itself encrypt the token or guarantee that its claims are trustworthy.
In authentication systems, applications may use JWTs to establish identity or make authorization decisions, including during OpenID Connect and token introspection flows. Attackers may exploit weak validation to make a service accept altered or improperly signed claims. Defenses should verify the signature using trusted keys and permitted algorithms, check relevant claims such as issuer, audience, and expiry, and reject tokens that fail validation. Treat a JWT as untrusted input until these checks are complete.


