Expected Behavior
If one of multiple UserDetailsService
beans is primary, then it should be configured.
Current Behavior Warning log message instead.
https://github.com/spring-projects/spring-security/blob/c905ac359dde44cb35bca688444438c2b8fe6beb/config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurer.java#L86-L92
Context
I want to enhance existing UserDetailsService
like this:
@Primary
@Bean
public UserDetailsService primaryUserDetailsService(UserDetailsService userDetailsService) {
return (username) -> {
// TODO load user from other source
return userDetailsService.loadUserByUsername(username);
};
}
I'd like to contribute if it's accepted.