Author: coheigea
Date: Thu Sep 8 15:47:28 2011
New Revision: 1166762
URL: http://svn.apache.org/viewvc?rev=1166762&view=rev
Log:
Store a secret associated with a processed SecurityContextToken in a
SecurityToken
Modified:
cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
Modified:
cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java?rev=1166762&r1=1166761&r2=1166762&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationInInterceptor.java
Thu Sep 8 15:47:28 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;
}
}