InterviewBuddy
All interview questions

What is the difference between authentication and authorization?

Beginner

Answer

Authentication establishes who a caller is. Authorization decides what that caller may do to a specific resource. A signed-in user must still be checked against ownership and role rules.

Explanation

Checking only that a token exists permits one user to access another user’s record if ownership is not enforced.

Example

GET /interviews/:id → verify identity → check owner