Test your JWT knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
What is the main architectural benefit of JWTs for authenticating stateless/distributed APIs, versus traditional server-side sessions?
Questions in this quiz
What is the main architectural benefit of JWTs for authenticating stateless/distributed APIs, versus traditional server-side sessions?
Why is putting a long-lived, highly-privileged JWT (e.g. one lasting 30 days) directly in client-side storage generally considered riskier than a short-lived one?
What are the three parts of a JWT?
What does "audience" (`aud`) and "issuer" (`iss`) claims let a verifier check?
What is the `exp` claim used for?
How is a JWT typically sent in an HTTP request to authenticate the caller?
What is a key challenge with revoking a JWT before its natural expiration (e.g. on logout or a compromised account)?
Where should a JWT be stored client-side in a browser-based web app, and what is the security trade-off?
What is a JWT (JSON Web Token)?
What is a "refresh token", and how does it typically differ from an "access token"?
Why is it important to explicitly verify the `alg` field before trusting a JWT, rather than blindly using whatever algorithm the token itself claims?
What is the difference between the `HS256` and `RS256` signing algorithms?