What is JWT?
JWT means JSON Web Token. It represents claims exchanged between parties. Decoding claims does not authenticate them: verify the signature with trusted keys and validate the expected issuer, audience and time claims before using a token for authorization.
JWT Structure
A JWT contains three sections: Header, Payload and Signature.
JWT Header
The header defines the token type and signing algorithm.
JWT Payload
Payload contains claims such as user id, permissions and expiration time.
JWT Signature
The signature verifies that token data was not modified.
Why Developers Use JWT
- API authentication
- Mobile applications
- Single sign-on systems
- Secure authorization