diff --git a/src/main/java/ru/ulstu/is/sbapp/Configuration/SecurityConfiguration.java b/src/main/java/ru/ulstu/is/sbapp/Configuration/SecurityConfiguration.java index bad4e96..333a3d3 100644 --- a/src/main/java/ru/ulstu/is/sbapp/Configuration/SecurityConfiguration.java +++ b/src/main/java/ru/ulstu/is/sbapp/Configuration/SecurityConfiguration.java @@ -54,16 +54,9 @@ public class SecurityConfiguration { .loginPage(LOGIN_URL).permitAll() .and() .logout().permitAll(); - return http.build(); + return http.userDetailsService(userService).build(); } - @Bean - public AuthenticationManager authenticationManagerBean(HttpSecurity http) throws Exception { - AuthenticationManagerBuilder authenticationManagerBuilder = http - .getSharedObject(AuthenticationManagerBuilder.class); - authenticationManagerBuilder.userDetailsService(userService); - return authenticationManagerBuilder.build(); - } @Bean public WebSecurityCustomizer webSecurityCustomizer() {