cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] git commit: Backmerging caching issue
Date Thu, 27 Feb 2014 14:39:10 GMT
Backmerging caching issue


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

Branch: refs/heads/2.6.x-fixes
Commit: cd5792951da9dcbb56d53975dfed93d322b73131
Parents: 439bda1
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Feb 27 14:37:20 2014 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Feb 27 14:38:57 2014 +0000

----------------------------------------------------------------------
 .../policy/interceptors/IssuedTokenInterceptorProvider.java | 9 +++------
 .../cxf/ws/security/policy/interceptors/STSInvoker.java     | 2 +-
 .../wss4j/policyhandlers/AbstractBindingBuilder.java        | 7 ++-----
 3 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cd579295/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
index 442ff4f..2f5ab2e 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
@@ -499,6 +499,7 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
                     return;
                 }
                 if (!isRequestor(message)) {
+                    message.getExchange().remove(SecurityConstants.TOKEN);
                     List<WSHandlerResult> results = 
                         CastUtils.cast((List<?>)message.get(WSHandlerConstants.RECV_RESULTS));
                     if (results != null && results.size() > 0) {
@@ -531,9 +532,7 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
                 boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
                 if (valid) {
                     SecurityToken token = createSecurityToken(assertionWrapper);
-                    getTokenStore(message).add(token);
-                    message.getExchange().remove(SecurityConstants.TOKEN);
-                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
+                    message.getExchange().put(SecurityConstants.TOKEN, token);
                     return;
                 }
             }
@@ -541,9 +540,7 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
                 boolean valid = issuedValidator.validatePolicy(issuedAis, binarySecurityToken);
                 if (valid) {
                     SecurityToken token = createSecurityToken(binarySecurityToken);
-                    getTokenStore(message).add(token);
-                    message.getExchange().remove(SecurityConstants.TOKEN);
-                    message.getExchange().put(SecurityConstants.TOKEN_ID, token.getId());
+                    message.getExchange().put(SecurityConstants.TOKEN, token);
                     return;
                 }
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cd579295/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSInvoker.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSInvoker.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSInvoker.java
index e36252f..dacdc77 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSInvoker.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSInvoker.java
@@ -162,7 +162,7 @@ abstract class STSInvoker implements Invoker {
                 .getProperty(TokenStore.class.getName());
         store.remove(cancelToken.getId());
         // Put the token on the out message so that we can sign the response
-        exchange.getEndpoint().put(SecurityConstants.TOKEN, cancelToken);
+        exchange.put(SecurityConstants.TOKEN, cancelToken);
         writer.writeEmptyElement(prefix, "RequestedTokenCancelled", namespace);
         
         writer.writeEndElement();

http://git-wip-us.apache.org/repos/asf/cxf/blob/cd579295/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 8fed2d4..1b6f154 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -622,11 +622,8 @@ public abstract class AbstractBindingBuilder {
                 st = getTokenStore().getToken(id);
             }
         }
-        if (st != null) {
-            getTokenStore().add(st);
-            return st;
-        }
-        return null;
+        
+        return st;
     }
 
     protected void addSignatureParts(Map<Token, Object> tokenMap,


Mime
View raw message