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
HttpSecurity construction #7449
Labels
Comments
jzheaux
added
in: web
An issue in web modules (web, webmvc)
type: enhancement
A general enhancement
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
Mar 31, 2022
Given that public HttpSecurity(ApplicationContext context) {
this(NOOP_OBJECT_POST_PROCESSOR,
withPasswordEncoder(context), Collections.singletonMap(ApplicationContext.class, context));
}
private static AuthenticationManagerBuilder withPasswordEncoder(ApplicationContext context) {
WebSecurityConfigurerAdapter.LazyPasswordEncoder passwordEncoder =
new WebSecurityConfigurerAdapter.LazyPasswordEncoder(context);
return new WebSecurityConfigurerAdapter.DefaultPasswordEncoderAuthenticationManagerBuilder(
NOOP_OBJECT_POST_PROCESSOR, passwordEncoder);
} |
Another option is that since we have the |
Should we enforce the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
It'd be handy to be able to construct an instance of
HttpSecurity
independently from anWebSecurityConfigurerAdapter
.In theory, this is possible since
HttpSecurity
has apublic
constructor, but that's currently impractical due to its abstract nature:If there were a simpler way to build an
HttpSecurity
instance, then code like the following would be within reach:which seems like a powerful tool for multi-tenancy.
The text was updated successfully, but these errors were encountered: