DEV Community

Al-Amin Islam
Al-Amin Islam

Posted on

1

Understanding authentication and authorization in simple words

Suppose you want to enter a restricted area. You can't just enter there, you will definitely need a pass card to enter. Suppose it is an ID card, with this ID card you can enter all parts of that area except some VIP areas. This card has a validity period, which I will discuss later some day. Now the point is that as long as you have this valid ID card, you can access inside, whenever you lose the ID card or the validity period expires, you will be kicked out of that area . This is authentication

Now let's tell you what authorization means. Above I was talking about VIP areas, which you cannot enter even if you have a pass. You will need special permission to enter. This is what authorization is

Now let's see an example in programming:
Suppose you want to enter an admin panel. You will need your credentials to enter there, login with them and create a post on this panel, this is authentication. Now you have created the post but you do not have permission to delete it, this is authorization.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs