Chapter 19: Authentication
Learning Objectives
After completing this chapter, you should be able to do the following:
- Understand the basic concepts of authentication
- Use request filters to enable basic authentication in a Spring app
- Explain what two-way encryption is, and why it is not ideal for storing sensitive user data, such as passwords
- Explain what a one-way hash is, and why it presents greater security for storing sensitive user data
- Describe the characteristics of a good one-way hash function
- Write code that uses a provided hash function to hash sensitive data
- Describe how one-way hashes allow for passwords to be compared
- Describe the general authentication flow for a web app
Key Terminology
Introduction to Authentication
- cookies
- authorization
- authentication
- sessions
Hashing Password
- two-way encryption
- one-way encryption
- password hashing
- collision
- bcrypt
- MD5, SHA1
- hash function
Creating a User Model
- bcrypt
- query methods
Filtering Requests
- request filters
- whitelist
- code-based configuration