Think of it as the process of verifying your identity. Imagine you go to a gym. When you enter, the receptionist asks for your membership card or ID. Showing your card confirms who you are, that’s authentication. It’s like proving to the system that you are who you say you are. Example: Entering a password on your phone to unlock it. This action proves that you are the person who owns the phone (authentication).
Now, authorization is the next step, which decides what you can do once your identity is verified. Back to the gym example: After verifying your identity, the receptionist checks your membership level – are you allowed to use the swimming pool or just the gym? That’s authorization, it’s about what actions you’re allowed to take after you're authenticated. Example: After logging into your bank account, you’re allowed to check your balance and transfer money, but you can’t access other people's accounts. That’s the system controlling what you can or can’t do based on your role (authorization).
Authentication is the process of verifying who a user (or system) is.
Question answered: Are you really who you claim to be?
Example: When you log in to your email account by entering your username and password, the system authenticates you. If the password matches, you are authenticated as the legitimate user.
2. Authorization
Authorization is the process of determining what an authenticated user is allowed to do.
Question answered: What actions or resources are you permitted to access?
Example: After logging into the email system (authenticated), you may only be authorized to access your own inbox but not the system administrator’s dashboard.
In short: Authentication = Identity check (proving who you are). Authorization = Permission check (what you can do once authenticated).
Authentication is to answer questions like: Who are you? Do I know you? Proof to me that you are who you claim you are. Authorization is when after authentication, I need to check what resources you can have access to, which may be read, write, update, delete, and/or transfer/share.