在第 2 章中,Spring Security 入门,我们演示了如何使用内存数据存储来验证用户。在本章中,我们将探索如何通过扩展 Spring Security 的身份验证支持以使用我们现有的 API 集来解决一些常见的现实问题。通过这次探索,我们将了解 Spring Security 用于对用户进行身份验证的每个构建块。
在本章的课程中,我们将讨论以下主题:
- Leverage Spring Security’s annotations and Java-based configuration
- Discovering how to obtain the details of the currently logged-in user
- Adding the ability to log in after creating a new account
- Learning the simplest method for indicating to Spring Security, that a user is authenticated
- Creating custom UserDetailsService and AuthenticationProvider implementations that properly decouple the rest of the application from Spring Security
- Adding domain-based authentication to demonstrate how to authenticate with more than just a username and password