cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf-fediz git commit: Minor changes
Date Wed, 02 Sep 2015 11:33:34 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 27c94bbb5 -> 91e97c794


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/c0621a97
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/c0621a97
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/c0621a97

Branch: refs/heads/master
Commit: c0621a97ef71e5cec282fc70446277597a8e4f1c
Parents: 27c94bb
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 11:43:21 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/c0621a97/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/c0621a97/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