From 051a34f859a5852b09852a7e86ea85fde5263530 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Mon, 7 Mar 2005 12:23:48 +0000 Subject: [PATCH] Support credentialsExpiredUrl as per request made in http://forum.springframework.org/viewtopic.php?t=3862. --- .../org/acegisecurity/ui/AbstractProcessingFilter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/org/acegisecurity/ui/AbstractProcessingFilter.java b/core/src/main/java/org/acegisecurity/ui/AbstractProcessingFilter.java index 9d45e1e89f..7e30318968 100644 --- a/core/src/main/java/org/acegisecurity/ui/AbstractProcessingFilter.java +++ b/core/src/main/java/org/acegisecurity/ui/AbstractProcessingFilter.java @@ -20,6 +20,7 @@ import net.sf.acegisecurity.AuthenticationException; import net.sf.acegisecurity.AuthenticationManager; import net.sf.acegisecurity.AuthenticationServiceException; import net.sf.acegisecurity.BadCredentialsException; +import net.sf.acegisecurity.CredentialsExpiredException; import net.sf.acegisecurity.DisabledException; import net.sf.acegisecurity.LockedException; import net.sf.acegisecurity.context.ContextHolder; @@ -144,6 +145,7 @@ public abstract class AbstractProcessingFilter implements Filter, * the authentication service */ private String authenticationServiceFailureUrl; + private String credentialsExpiredFailureUrl; /** * Where to redirect the browser to if authentication is successful but @@ -490,6 +492,11 @@ public abstract class AbstractProcessingFilter implements Filter, failureUrl = authenticationProxyUntrustedFailureUrl; } + if (failed instanceof CredentialsExpiredException + && (credentialsExpiredFailureUrl != null)) { + failureUrl = credentialsExpiredFailureUrl; + } + if (logger.isDebugEnabled()) { logger.debug("Authentication request failed: " + failed.toString()); }