cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf-fediz git commit: Minor changes
Date Wed, 02 Sep 2015 12:11:03 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.2.x-fixes 3de9c77d7 -> 569571dec


Minor changes


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/6caf613b
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/6caf613b
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/6caf613b

Branch: refs/heads/1.2.x-fixes
Commit: 6caf613b2d39f2a480b6841dc0b94a27eaae951c
Parents: 3de9c77
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Sep 2 11:43:21 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Sep 2 13:10:26 2015 +0100

----------------------------------------------------------------------
 .../authentication/FederationAuthenticationProvider.java    | 9 ++-------
 .../apache/cxf/fediz/tomcat/FederationAuthenticator.java    | 5 ++---
 2 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/6caf613b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
index b103565..9621ef9 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/authentication/FederationAuthenticationProvider.java
@@ -102,13 +102,8 @@ public class FederationAuthenticationProvider implements AuthenticationProvider,
                     "Failed to get SignIn request"));
         }
 
-        FederationAuthenticationToken result = null;
-        
-        if (result == null) {
-            result = this.authenticateNow(authentication);
-            result.setDetails(authentication.getDetails());
-        }
-
+        FederationAuthenticationToken result = this.authenticateNow(authentication);
+        result.setDetails(authentication.getDetails());
         return result;
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/6caf613b/plugins/tomcat7/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/tomcat7/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
b/plugins/tomcat7/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
index c4333b5..68695a1 100644
--- a/plugins/tomcat7/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
+++ b/plugins/tomcat7/src/main/java/org/apache/cxf/fediz/tomcat/FederationAuthenticator.java
@@ -399,8 +399,7 @@ public class FederationAuthenticator extends FormAuthenticator {
     }
 
     protected boolean validateToken(Request request, HttpServletResponse response, FedizContext
fedConfig) {
-        Session session;
-        session = request.getSessionInternal();
+        Session session = request.getSessionInternal();
         if (session != null) {
 
             FedizResponse wfRes = (FedizResponse)session.getNote(FEDERATION_NOTE);
@@ -411,7 +410,7 @@ public class FederationAuthenticator extends FormAuthenticator {
             }
 
             Date currentTime = new Date();
-            if (!currentTime.after(wfRes.getTokenExpires())) {
+            if (!currentTime.after(tokenExpires)) {
                 return true;
             } else {
                 LOG.warn("Token already expired. Clean up and redirect");


Mime
View raw message