Security & CryptoLesson 341Free preview
JWT Signer
This lesson is part of Web Developer Tools · All levels
Summary
JWT (JSON Web Token) is a token made up of header, payload, and signature separated by a point. The payload contains claims such as user identity and expiration time, then the signature ensures the token is unchanged. JWT is only encrypted Base64URL, not encrypted, so confidential data cannot be placed inside it.
Key points
- JWT has three parts: header, payload, and signature
- The header and payload are encoded only Base64URL and can be read by anyone
- Claim exp determines the expiration date of the token
- HS256 uses a single secret, while RS256 uses private and public keys.
- The server is obliged to verify the signature, the algorithm allowed, and the time claim
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.