- Explain what authentication is.
- Explain why authentication is important.
- Use bcrypt to authenticate a user.
- Explain what a claim is.
- Explain what a JSON Web Token is.
- Explain why a JSON Web Token is important.
- Create a JSON Web Token for an authenticated user.
- Explain what authorization is.
- Verify a JSON Web Token to authorize a user.
Turn to your neighbor and discuss what authentication is. Be prepared to share with the class.
Turn to your neighbor and discuss why authentication is important. Be prepared to share with the class.
On your slates, write down the code that compares a password hash to a plain text password. Assume that you have already gotten the hashed password from the database.
Turn to your neighbor and explain what a claim is. Be prepared to share your answer with the class.
Turn to your neighbor and explain what a JSON Web Token is. Be prepared to share your answer with the class.
Turn to your neighbor and discuss why a JSON Web Token is important. Be prepared to share your answer with the class.
- On a slate, write code for a JSON Web Token for a user that is already authenticated.
- Turn to your neighbor and explain what a authorization is.
- What is a cookie?
- How do you add a JWT to a cookie
- Why do we use cookies and JWTs to authenticate?
Write code that verfies if a JWT is valid.