JWT is a compact, self-contained token used for authentication and authorization. It contains encoded user data and is signed to prevent tampering. It's like a stamped ID badge—the guard checks the stamp without calling HR every time.
Active Recall
3 Flashcards
Interview Flashcards & Mock Mode
Practice with 3D flip cards, voice reader, and timed interview simulations.
Speed Drills
60s Micro-Tests
CodeShot.in — Daily Challenges
60-second in-browser coding micro-challenges to sharpen syntax and problem-solving speed.
What is JWT (JSON Web Token) and how does it work?
What are the three parts of a JWT?
A JWT has three parts: Header (algorithm info), Payload (user claims/data), and Signature (verification). They are base64-encoded and separated by dots.
What is the difference between authentication and authorization?
Authentication verifies who you are (logging in). Authorization determines what you're allowed to do (access control). A hotel key card authenticates you; the floor it opens authorizes your access.