дефолтная страница логина

pull/2/head
L_DelOff 2023-03-04 21:48:07 +03:00
parent 8cb50f6762
commit b21d3a6a5b
1 changed files with 4 additions and 4 deletions

View File

@ -9,16 +9,16 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
import ru.ldeloff.hedgehogcloud.service.UserService;
import ru.ldeloff.hedgehogcloud.service.UserServiceImpl;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
UserService userService;
UserServiceImpl userService;
AuthenticationSuccessUserHandler authenticationSuccessUserHandler;
public WebSecurityConfig(UserService userService, AuthenticationSuccessUserHandler authenticationSuccessUserHandler) {
public WebSecurityConfig(UserServiceImpl userService, AuthenticationSuccessUserHandler authenticationSuccessUserHandler) {
this.userService = userService;
this.authenticationSuccessUserHandler = authenticationSuccessUserHandler;
}
@ -32,7 +32,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
http.formLogin()
// указываем страницу с формой логина
.loginPage("/login")
//.loginPage("/login")
//указываем логику обработки при логине
.successHandler(authenticationSuccessUserHandler)
// указываем action с формы логина