This commit is contained in:
Dario Ghunney Ware 2025-05-27 12:36:35 +01:00
parent ec0927fa2b
commit 2bc9b0150f

View File

@ -163,8 +163,7 @@ public class SecurityConfiguration {
.maxSessionsPreventsLogin(false)
.sessionRegistry(sessionRegistry)
.expiredUrl("/login?logout=true"));
http.getSharedObject(AuthenicationManagerBuilder.class)
.authenticationProvider(daoAuthenticationProvider());
http.authenticationProvider(daoAuthenticationProvider());
http.requestCache(requestCache -> requestCache.requestCache(new NullRequestCache()));
http.logout(
logout ->
@ -301,14 +300,6 @@ public class SecurityConfiguration {
return http.build();
}
@Bean
public AuthenticationManager authenticationManager(HttpSecurity http) throws Exception {
return http.getSharedObject(AuthenticationManagerBuilder.class)
.authenticationProvider(daoAuthenticationProvider())
.build();
}
@Bean
public DaoAuthenticationProvider daoAuthenticationProvider() {
DaoAuthenticationProvider provider = new DaoAuthenticationProvider(userDetailsService);
provider.setPasswordEncoder(passwordEncoder());