itzg / itzg/spring-security-spa
UserDetailsService support missing
- Dominant language
- Java
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Instead of an InMemoryUserDetailsManager i am using a UserDetailsService implementation since i have some extravagant logic besides just tapping into a database.
This is the error i get:
```
***************************
APPLICATION FAILED TO START
***************************
Description:
Method springSecurityFilterChain in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a bean of type 'org.springframework.security.provisioning.UserDetailsManager' that could not be found.
- Bean method 'inMemoryUserDetailsManager' not loaded because @ConditionalOnMissingBean (types: org.springframework.security.authentication.AuthenticationManager,org.springframework.security.authentication.AuthenticationProvider,org.springframework.security.core.userdetails.UserDetailsService; SearchStrategy: all) found beans of type 'org.springframework.security.core.userdetails.UserDetailsService' myUserDetailsService and found beans of type 'org.springframework.security.authentication.AuthenticationProvider' authenticationProvider
Action:
Consider revisiting the conditions above or defining a bean of type 'org.springframework.security.provisioning.UserDetailsManager' in your configuration.
```
Could a solution be that the RegistrationFilter in the SinglePageAppConfigurer also allows a UserDetailsService instead of just a UserDetailsManager?
```
registrationFilter.setUserDetailsManager(applicationContext.getBean(UserDetailsManager.class));
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with RegistrationFilter in SinglePageAppConfigurer and the setUserDetailsManager call shown in the issue, then trace how the application context obtains the authentication components. The work is complete when an application using a custom UserDetailsService can start without requiring a UserDetailsManager.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100