cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1528996 - /cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
Date Thu, 03 Oct 2013 20:18:19 GMT
Author: owulff
Date: Thu Oct  3 20:18:19 2013
New Revision: 1528996

URL: http://svn.apache.org/r1528996
Log:
Provide option to disable token expiration validation

Modified:
    cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java

Modified: cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java?rev=1528996&r1=1528995&r2=1528996&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
(original)
+++ cxf/fediz/trunk/plugins/tomcat/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
Thu Oct  3 20:18:19 2013
@@ -72,6 +72,7 @@ public class FederationAuthenticator ext
      * Fediz Configuration file
      */
     protected String configFile;
+    protected boolean tokenExpirationValidation = true;
 
     private FederationConfigurator configurator;
 
@@ -94,6 +95,14 @@ public class FederationAuthenticator ext
     public void setConfigFile(String configFile) {
         this.configFile = configFile;
     }
+    
+    public boolean isTokenExpirationValidation() {
+        return tokenExpirationValidation;
+    }
+
+    public void setTokenExpirationValidation(boolean tokenExpirationValidation) {
+        this.tokenExpirationValidation = tokenExpirationValidation;
+    }
 
     @Override
     protected synchronized void startInternal() throws LifecycleException {
@@ -216,6 +225,11 @@ public class FederationAuthenticator ext
                     LOG.debug("Token doesn't expire");
                     return true;
                 }
+                if (!this.tokenExpirationValidation) {
+                    LOG.debug("Token expiration not validated.");
+                    return true;
+                }
+                
                 Date currentTime = new Date();
                 if (currentTime.after(wfRes.getTokenExpires())) {
                     LOG.debug("Token already expired. Clean up and redirect");



Mime
View raw message