Security for Developers #3: Authorization — RBAC, OAuth 2.0, and OpenID Connect
In the previous tutorial, you learned how to authenticate users — verifying who they are. But authentication alone is not enough. You also need authorization — controlling what they can do. Authentication answers: “Who are you?” Authorization answers: “What are you allowed to do?” Authentication vs Authorization Authentication Authorization Question Who are you? What can you do? When During login After login, on every request Method Password, JWT, biometrics Roles, permissions, policies Example “You are user Alex” “Alex can read posts but not delete them” A common mistake is checking authentication but skipping authorization. The user is logged in, so the app trusts them completely. This leads to Broken Access Control — the #1 risk in the OWASP Top 10. ...