What is the primary role of the UserDetailsService in Spring Security?
- Authenticating users based on their roles.
- Loading user details from a data store.
- Encrypting user passwords.
- Handling access control policies.
The primary role of the UserDetailsService in Spring Security is to load user details (including username, password, and roles) from a data store, typically a database. It's a fundamental component used for authentication and authorization, as it provides the necessary user information for the security framework to make access control decisions. The other options describe tasks related to authentication and authorization but are not the primary role of UserDetailsService.
Loading...
Related Quiz
- In a Spring Boot application, the HTTP request body can be deserialized using the _____ annotation.
- To create conditional beans within custom Auto Configuration, you can use the @_____ annotation with a specific condition.
- In a reactive Spring Boot application, _____ is used to handle back pressure in a reactive stream.
- In OAuth2, the _____ grant type is used by clients to exchange user credentials for an access token.
- In Spring Boot, the _____ interface is used to represent a reactive stream that emits multiple items.