1. In a stateless REST API, where should the client's identity/auth info live?
- In server-side session memory
- Stored in the database and looked up by IP
- Sent with every request (e.g. a token in headers)
- Hard-coded in the client source code
Show answer
Answer: Sent with every request (e.g. a token in headers)
Statelessness means the server holds no per-client session; the request itself must carry the credentials needed to authenticate it.
Lesson: Statelessness