All quizzesMedium
Tokens & Identity — Series 3
Preview — 3 of 10 questions
What should a token issuer add to a short-lived access token so validation can enforce its lifetime?
AA timezone-aware exp claim
BA public plaintext password
CThe FastAPI app object
DA copy of the response headers
A token is validly signed but lacks the required subject identifier. How should get_current_user behave?
AGuess the first user in the database
BReject it as unusable for identifying a user
CAccept it as an anonymous administrator
DUse the token's final character as the username
OAuth2PasswordRequestForm reads username and password. Does it authenticate them automatically?
AYes, it queries the user table itself
BYes, it creates a JWT before the route runs
CNo, the token route must check the submitted credentials
DOnly if /docs is open
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.