cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Backmerging caching issue
Date Thu, 27 Feb 2014 14:37:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 947faeef0 -> c5a345f58


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

Branch: refs/heads/2.7.x-fixes
Commit: c5a345f585abc871cae0e1f85aa0edd4c8c039d8
Parents: 947faee
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:37:20 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/c5a345f5/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 d0a6769..9945c79 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
@@ -521,6 +521,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) {
@@ -551,9 +552,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;
                 }
             }
@@ -561,9 +560,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/c5a345f5/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/c5a345f5/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 869f317..5f3cde9 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
@@ -629,11 +629,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