Remove setAuthenticationManager from HttpSecurityConfiguration

Closes gh-11776
This commit is contained in:
Marcus Da Coregio 2022-08-31 15:14:45 -03:00
parent f1b79e08cb
commit 3de421be3a
1 changed files with 1 additions and 8 deletions

View File

@ -56,8 +56,6 @@ class HttpSecurityConfiguration {
private ObjectPostProcessor<Object> objectPostProcessor; private ObjectPostProcessor<Object> objectPostProcessor;
private AuthenticationManager authenticationManager;
private AuthenticationConfiguration authenticationConfiguration; private AuthenticationConfiguration authenticationConfiguration;
private ApplicationContext context; private ApplicationContext context;
@ -70,10 +68,6 @@ class HttpSecurityConfiguration {
this.objectPostProcessor = objectPostProcessor; this.objectPostProcessor = objectPostProcessor;
} }
void setAuthenticationManager(AuthenticationManager authenticationManager) {
this.authenticationManager = authenticationManager;
}
@Autowired @Autowired
void setAuthenticationConfiguration(AuthenticationConfiguration authenticationConfiguration) { void setAuthenticationConfiguration(AuthenticationConfiguration authenticationConfiguration) {
this.authenticationConfiguration = authenticationConfiguration; this.authenticationConfiguration = authenticationConfiguration;
@ -120,8 +114,7 @@ class HttpSecurityConfiguration {
} }
private AuthenticationManager authenticationManager() throws Exception { private AuthenticationManager authenticationManager() throws Exception {
return (this.authenticationManager != null) ? this.authenticationManager return this.authenticationConfiguration.getAuthenticationManager();
: this.authenticationConfiguration.getAuthenticationManager();
} }
private AuthenticationEventPublisher getAuthenticationEventPublisher() { private AuthenticationEventPublisher getAuthenticationEventPublisher() {