Authorization and Authentication Part 2 - The authenticated strike back
Explain what a token is
Explain what authorization is
Walk through the process of making sure a user is authenticated before accessing a route
Walk through the procees of making sure that user can only access resources that belong the them.
Walk through a full stack authorization process
With your table, create a definition of what a token is. Be prepared to share your answer
Explain what authorization is
With your table, create a definition of what authorization is. Be prepared to share your definition.
Is Authentication an integral part if Authorization. If so, why?
Why would Authorization be useful in a web application?
Walk through the process of making sure a user is authenticated before accessing a route
On the backend code, make sure you are in the master branch
What happens when you run the following command? Why did the response return what it did?
http :3000/protected
http POST :3000/auth/token username="student" password="student"
Copy the token and place it in the command below
http :3000/protected "Authorization: Bearer <token goes here>"
Walk through the procees of making sure that user can only access resources that belong the them.
On the master branch
Log in to an account
http POST :3000/auth/token username="student" password="student"
Copy the token and place it in the command below
http :3000/protected/100 "Authorization: Bearer <token goes here>"
What happened? Why?
Copy the token and place it in the command below
http :3000/protected/<your user id> "Authorization: Bearer <token goes here>"
Walk through a full stack authorization process
What happens when you load index.html?
What happens when the login button is clicked with a good password?
What happens when the login button is clicked with a bad password?
Where does the token get stored?
What happens when protected.html is loaded without a token?