codejump

Tokens & Identity

Preview — 3 of 10 questions

A /token route uses OAuth2PasswordRequestForm. Where should a client send username and password?

AAs form fields
BAs URL path segments
COnly inside a JWT
DIn response headers

A password hash is stored in the database. How should a login attempt check a submitted password?

AHash it with a new random salt and compare strings directly
BUse the hashing library's verify function
CDecrypt the stored hash
DCompare it to the username

OAuth2PasswordBearer gives a route the string abc. What has that helper established?

AThe JWT signature is valid
BThe user exists and is active
CA Bearer-formatted credential was presented, not that abc is valid
DAll OAuth2 scopes are granted

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.