1. What is the difference between authentication and authorization?
Authentication verifies who you are (login, JWT validation). Authorization verifies what you're allowed to do (role-based access, permissions). A common mistake is confusing them: a valid JWT proves identity but doesn't grant access — you still need to check if that identity has permission for the requested resource.