-
Notifications
You must be signed in to change notification settings - Fork 1.3k
When I added a custom UserDetailService, there seemed to be some issues with the ProviderManager #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, obvious question as I don't see them: did you set the |
I did not proactively set up DaoAuthenticationProvider and AuthenticationManager I think it should be automatically loaded. If not, how should I set them? |
In my use case I've set them like this:
I'd like to have a feedback if this work even for you. |
It has indeed taken effect, as long as DaoAuthenticationProvider is redefined here The ProviderManager will load the parent, which is strange In spring boot 3.1.3, I did not redefine DaoAuthenticationProvider, only defined UserDetailService, which will take effect |
Glad this helped you, but maybe someone else can explain why in v3.1.3 it's not necessary to set the |
Thanks |
I know why, just like I was #1370 As said There is another UserDetailService under DefaultSecurityConfig I suggest organizing the documents, such as creating a timeline diagram for the samples project |
When I add a custom UserDetailService, it loses its default Provider correspondence
Tracking code found that in ProviderManger, the parent of ProviderManager is empty
When I do not add a custom UserDetailService, the parent of the ProviderManager has a value, and there is a corresponding provider in the providers
When I comment out this code
When I release the comment
I don't know what I should do to solve this problem
The text was updated successfully, but these errors were encountered: