what is advantage of authentication and authorization code example
Example 1: authentication vs authorization
Authentication :
telling the system who you are
by providing username and password.
Authorization :
things you can do according to who you are
------ few ways of Authorization:
Basic Auth --
providing username and password for each and every request you
make
Token based
generate a long token just one time
and use that for the rest of the request
similar to the visitor tag you get when you go to certain
restricted areas
API KEY ---
Bearer Token --
Example 2: what is authentication
Authentication is the process of recognizing a user’s identity.
It is the mechanism of associating an incoming request
with a set of identifying credentials.
credentials provided are compared to those on a file
in a database of the authorized user’s information
on a local operating system
or within an authentication server.