upgraded to shiro 1.4.0

enhanced error messages
This commit is contained in:
jomu
2017-06-15 15:20:09 +00:00
parent d90284d28c
commit 2590070958
2 changed files with 12 additions and 9 deletions

View File

@ -63,10 +63,14 @@ 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());
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(hint, ex);
} else {
LOGGER.error(hint + " Reason: " + ex.toString());
}
FacesUtil.addErrorMessage("Login failed");
AccountEntity account = accountService.getAccountEntity(username, false);

View File

@ -44,7 +44,6 @@
<freemarker.version>2.3.24-incubating</freemarker.version>
<pdfbox.version>2.0.2</pdfbox.version>
<gson.version>2.7</gson.version>
<shiro.version>1.3.2</shiro.version>
</properties>
<dependencyManagement>
@ -110,12 +109,12 @@
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.version}</version>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>