Bird
Raised Fist0

Given a JWT with payload {"sub":"user123","exp":1700000000}, what does the exp claim represent?

medium🧠 Conceptual Q4 of Q15
Rest API - Authentication and Authorization
Given a JWT with payload {"sub":"user123","exp":1700000000}, what does the exp claim represent?
AThe token's issue time
BThe token's expiration time as a Unix timestamp
CThe user's role in the system
DThe token's unique identifier
Step-by-Step Solution
Solution:
  1. Step 1: Understand JWT standard claims

    The exp claim defines when the token expires, given as a Unix timestamp.
  2. Step 2: Differentiate exp from other claims

    iat is issue time, roles are custom claims, and token ID is jti.
  3. Final Answer:

    The token's expiration time as a Unix timestamp -> Option B
  4. Quick Check:

    exp = Expiration time [OK]
Quick Trick: exp means expiration timestamp [OK]
Common Mistakes:
MISTAKES
  • Confusing exp with issue time
  • Assuming exp is user role
  • Mixing exp with token ID

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes