From c57914db7c0dd6ea2a1cc17e49e23e182411d0c6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 27 Nov 2019 08:49:01 +0400 Subject: [PATCH] auth --- .../ru/ulstu/configuration/SecurityConfiguration.java | 2 +- .../java/ru/ulstu/core/controller/AdviceController.java | 9 ++++----- src/main/resources/application.properties | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/ulstu/configuration/SecurityConfiguration.java b/src/main/java/ru/ulstu/configuration/SecurityConfiguration.java index 5eb7220..ebabf71 100644 --- a/src/main/java/ru/ulstu/configuration/SecurityConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/SecurityConfiguration.java @@ -80,7 +80,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .anyRequest().authenticated() .and() .formLogin() - .loginPage("/login") + .loginPage("/login.xhtml") .successHandler(authenticationSuccessHandler) .failureHandler(authenticationFailureHandler) .permitAll() diff --git a/src/main/java/ru/ulstu/core/controller/AdviceController.java b/src/main/java/ru/ulstu/core/controller/AdviceController.java index 27c9d5b..b474c6c 100644 --- a/src/main/java/ru/ulstu/core/controller/AdviceController.java +++ b/src/main/java/ru/ulstu/core/controller/AdviceController.java @@ -17,7 +17,6 @@ import ru.ulstu.user.error.UserIdExistsException; import ru.ulstu.user.error.UserIsUndeadException; import ru.ulstu.user.error.UserLoginExistsException; import ru.ulstu.user.error.UserNotActivatedException; -import ru.ulstu.user.error.UserNotFoundException; import ru.ulstu.user.error.UserPasswordsNotValidOrNotMatchException; import ru.ulstu.user.error.UserResetKeyError; import ru.ulstu.user.error.UserSendingMailException; @@ -94,10 +93,10 @@ public class AdviceController { return handleException(ErrorConstants.USER_PASSWORDS_NOT_VALID_OR_NOT_MATCH); } - @ExceptionHandler(UserNotFoundException.class) - public ResponseExtended handleUserNotFoundException(Throwable e) { - return handleException(ErrorConstants.USER_NOT_FOUND, e.getMessage()); - } +// @ExceptionHandler(UserNotFoundException.class) +// public ResponseExtended handleUserNotFoundException(Throwable e) { +// return handleException(ErrorConstants.USER_NOT_FOUND, e.getMessage()); +// } @ExceptionHandler(UserNotActivatedException.class) public Response handleUserNotActivatedException(Throwable e) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 3d814c5..ce9b208 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -40,7 +40,7 @@ spring.liquibase.enabled=true # Application Settings ng-tracker.base-url=http://127.0.0.1:8080 ng-tracker.undead-user-login=admin -ng-tracker.dev-mode=true +ng-tracker.dev-mode=false ng-tracker.debug_email=romanov73@gmail.com ng-tracker.use-https=false ng-tracker.check-run=false