Security

Authentication vs authorization: what's the difference?

Authentication vs authorisation explained: who you are versus what you may do, why 401 and 403 differ, roles and ownership checks, and where OAuth fits in.

  • 6 min read
  • 5 questions
  • +35 XP
Transcript

Authentication vs Authorization, explained by cats. Kitty wants to enter the house. She stands at the door. Humans ask, "Who are you?" Kitty shows her face. Meows her special meow. Maybe scans her chip. Human recognises her kitty. and lets her in.

That's Authentication. Proving you are who you say you are. But inside the house… Kitty sees the treat cupboard. She tries to open it. Human stops her and says, "You may enter but no treats." That's Authorization. What you’re allowed to do after you're verified.

Kitty is authenticated. But not authorized for treats. Tragic. She tries again. Very sad eyes. Head tilts. Finally, humans approve. Treat access authorized. Now Kitty eats snacks. and Kitty is happy.