-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Why should we use UserDetailsService bean instead of configureGlobal method #7526
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
@bangseongbeom Previously, our sample was specifying the |
@bangseongbeom Since this is more of a question rather than an issue with Spring Security, I will go ahead and close it. Feel free to ask any followup questions in this thread. |
Both ways use
InMemoryUserDetailsManagerConfigurer.java: super(new InMemoryUserDetailsManager(new ArrayList<>())); And it's ancestor class, AbstractDaoAuthenticationConfigurer.java: private DaoAuthenticationProvider provider = new DaoAuthenticationProvider(); If your main purpose is not JDBC nor in-memory, but just a custom authentication mechanism, I agree that exposing a custom But your main purpose is JDBC or in-memory, rather than expose Because And it's not natural that in-memory authentication is provided to expose |
@bangseongbeom you can still use a custom The The purpose of the There are other samples, such as the one for multitenancy where an |
Uh oh!
There was an error while loading. Please reload this page.
Summary
#7283 changed from
configureGlobal
toUserDetailsService
by @eleftherias.I'm wondering why
UserDetailsService
bean is preferred toinMemoryAuthentication
method.The text was updated successfully, but these errors were encountered: