In Spring Security, which class is primarily responsible for holding the authenticated user’s details?
- UserDetails
- UserPrincipal
- AuthenticationDetails
- SecurityContext
In Spring Security, the class primarily responsible for holding the authenticated user's details is UserDetails. It represents user information, including username, password, authorities, and account status. SecurityContext is used to hold the security context, and the other options do not typically hold user details.
Loading...
Related Quiz
- How does the @ConditionalOnClass annotation influence the application of auto-configuration in Spring Boot?
- How can you implement a custom reactive data repository in Spring Boot?
- What is the significance of the @MockBean annotation in Spring Boot testing?
- In a Spring application with multiple security configurations, how would you ensure that the security annotations on service methods are evaluated in the correct order to enforce the intended security constraints?
- If you were to set up a highly available service discovery system using Spring Cloud and Eureka, how would you go about it, and what considerations would you need to account for?