diff --git a/account/src/main/java/de/muehlencord/shared/account/ui/LoginView.java b/account/src/main/java/de/muehlencord/shared/account/ui/LoginView.java index e6281e6..588579f 100644 --- a/account/src/main/java/de/muehlencord/shared/account/ui/LoginView.java +++ b/account/src/main/java/de/muehlencord/shared/account/ui/LoginView.java @@ -41,7 +41,7 @@ public class LoginView implements Serializable { private String resetPasswordToken = null; private static final Logger LOGGER = LoggerFactory.getLogger(LoginView.class.getName()); - + public void authenticate() { // Example using most common scenario of username/password pair: @@ -63,11 +63,15 @@ public class LoginView implements Serializable { String fallbackUrl = "/web/index.xhtml"; // TODO make configurable // ec.redirect(url); WebUtils.redirectToSavedRequest((ServletRequest) ec.getRequest(), (ServletResponse) ec.getResponse(), fallbackUrl); - } catch (IOException | AuthenticationException e) { + } catch (IOException | AuthenticationException ex) { // Could catch a subclass of AuthenticationException if you like String hint = "Error while authenticating user " + username; - LOGGER.error(hint + "Reason: " + e.toString()); - FacesUtil.addErrorMessage("Login failed"); + if (LOGGER.isDebugEnabled()) { + LOGGER.debug(hint, ex); + } else { + LOGGER.error(hint + " Reason: " + ex.toString()); + } + FacesUtil.addErrorMessage("Login failed"); AccountEntity account = accountService.getAccountEntity(username, false); if (account != null) { @@ -96,11 +100,11 @@ public class LoginView implements Serializable { boolean passwordResetted = accountService.resetPassword(username, password, resetPasswordToken); if (passwordResetted) { // TODO add email notification on updated user account - FacesUtil.addInfoMessage ("Password resetted"); + FacesUtil.addInfoMessage("Password resetted"); return login(); } else { // TODO add email notificaton on failed password reset - FacesUtil.addErrorMessage("Password reset failed"); + FacesUtil.addErrorMessage("Password reset failed"); return login(); } } diff --git a/pom.xml b/pom.xml index 1327f33..1835a91 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,6 @@ 2.3.24-incubating 2.0.2 2.7 - 1.3.2 @@ -110,12 +109,12 @@ org.apache.shiro shiro-core - ${shiro.version} + 1.4.0 org.apache.shiro shiro-web - ${shiro.version} + 1.4.0 javax