|
|
@ -16,7 +16,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
|
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
|
|
|
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
|
|
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
|
|
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
|
|
|
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
|
|
|
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
|
|
|
|
import ru.ulstu.core.model.RestAuthenticationFailureHandler;
|
|
|
|
import ru.ulstu.core.model.AuthFailureHandler;
|
|
|
|
import ru.ulstu.user.controller.UserController;
|
|
|
|
import ru.ulstu.user.controller.UserController;
|
|
|
|
import ru.ulstu.user.model.UserRoleConstants;
|
|
|
|
import ru.ulstu.user.model.UserRoleConstants;
|
|
|
|
import ru.ulstu.user.service.UserService;
|
|
|
|
import ru.ulstu.user.service.UserService;
|
|
|
@ -44,7 +44,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|
|
|
AuthenticationSuccessHandler authenticationSuccessHandler,
|
|
|
|
AuthenticationSuccessHandler authenticationSuccessHandler,
|
|
|
|
LogoutSuccessHandler logoutSuccessHandler,
|
|
|
|
LogoutSuccessHandler logoutSuccessHandler,
|
|
|
|
ApplicationProperties applicationProperties,
|
|
|
|
ApplicationProperties applicationProperties,
|
|
|
|
RestAuthenticationFailureHandler authenticationFailureHandler) {
|
|
|
|
AuthFailureHandler authenticationFailureHandler) {
|
|
|
|
this.userService = userService;
|
|
|
|
this.userService = userService;
|
|
|
|
this.bCryptPasswordEncoder = bCryptPasswordEncoder;
|
|
|
|
this.bCryptPasswordEncoder = bCryptPasswordEncoder;
|
|
|
|
this.authenticationSuccessHandler = authenticationSuccessHandler;
|
|
|
|
this.authenticationSuccessHandler = authenticationSuccessHandler;
|
|
|
@ -71,6 +71,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
|
|
|
|
.antMatchers(UserController.ACTIVATE_URL).permitAll()
|
|
|
|
.antMatchers(UserController.ACTIVATE_URL).permitAll()
|
|
|
|
.antMatchers(Constants.PASSWORD_RESET_REQUEST_PAGE).permitAll()
|
|
|
|
.antMatchers(Constants.PASSWORD_RESET_REQUEST_PAGE).permitAll()
|
|
|
|
.antMatchers(Constants.PASSWORD_RESET_PAGE).permitAll()
|
|
|
|
.antMatchers(Constants.PASSWORD_RESET_PAGE).permitAll()
|
|
|
|
|
|
|
|
.antMatchers("/users/block").permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.REGISTER_URL).permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.REGISTER_URL).permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.ACTIVATE_URL).permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.ACTIVATE_URL).permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.PASSWORD_RESET_REQUEST_URL).permitAll()
|
|
|
|
.antMatchers(UserController.URL + UserController.PASSWORD_RESET_REQUEST_URL).permitAll()
|
|
|
|