Definition: JWT = JSON Web Token, a compact token containing claims that can be digitally signed so a server can verify who/what the token represents.
It is commonly used for authentication and authorization between clients and APIs.
Examples:
- User logs in → server returns JWT → browser sends it with API requests.
- JWT contains
userId=123androle=admin. - Mobile app sends a JWT to access
/api/orders.
Typical structure:
header.payload.signature