← All topics
Quiz: Authentication, Sessions and JWT: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. A logged-in student tries to open the admin dashboard. Which concept is being checked?
- Q2. Why do we add a random salt to each password before hashing?
- Q3. Which is a suitable password-hashing algorithm?
- Q4. What does this print? (code)
- Q5. An attacker changes the role inside a JWT payload from "student" to "admin". What stops this from working?
- Q6. What are the three parts of a JWT, in order?
- Q7. Why is logging a user out immediately harder with JWTs than with server-side sessions?
- Q8. Where is it risky to keep a login token in the browser?
- Q9. GET /api/results/1043 returns a result that belongs to a different student. What check is missing?
- Q10. Which login error message is better for security?