cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1166764 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
Date Thu, 08 Sep 2011 15:49:54 GMT
Author: coheigea
Date: Thu Sep  8 15:49:53 2011
New Revision: 1166764

URL: http://svn.apache.org/viewvc?rev=1166764&view=rev
Log:
Store a secret associated with a processed SecurityContextToken in a SecurityToken

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java?rev=1166764&r1=1166763&r2=1166764&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
Thu Sep  8 15:49:53 2011
@@ -470,6 +470,14 @@ class SecureConversationInInterceptor ex
                                 = (SecurityContextToken)wser
                                     .get(WSSecurityEngineResult.TAG_SECURITY_CONTEXT_TOKEN);
                             message.getExchange().put(SecurityConstants.TOKEN_ID, tok.getIdentifier());
+                            byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET);
+                            if (secret != null) {
+                                SecurityToken token = new SecurityToken(tok.getIdentifier());
+                                token.setToken(tok.getElement());
+                                token.setSecret(secret);
+                                token.setTokenType(WSConstants.WSC_SCT);
+                                message.getExchange().put(SecurityConstants.TOKEN, token);
+                            }
                             found = true;
                         }
                     }



Mime
View raw message