cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Store security context for SPNEGO case
Date Tue, 20 May 2014 16:03:20 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 3248da800 -> 7a5bc6122


Store security context for SPNEGO case


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

Branch: refs/heads/2.7.x-fixes
Commit: 7a5bc61223682d7e99dc831aa2a73a5c424a988f
Parents: 3248da8
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue May 20 17:02:10 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue May 20 17:03:02 2014 +0100

----------------------------------------------------------------------
 .../policy/interceptors/SpnegoContextTokenInInterceptor.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7a5bc612/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenInInterceptor.java
index 967f453..ba72404 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SpnegoContextTokenInInterceptor.java
@@ -37,6 +37,7 @@ import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
+import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.JAXWSAConstants;
@@ -191,6 +192,11 @@ class SpnegoContextTokenInInterceptor extends AbstractPhaseInterceptor<SoapMessa
             token.setToken(sct.getElement());
             token.setTokenType(sct.getTokenType());
             
+            SecurityContext sc = exchange.getInMessage().get(SecurityContext.class);
+            if (sc != null) {
+                token.setSecurityContext(sc);
+            }
+            
             writer.getCurrentNode().appendChild(sct.getElement());
             writer.writeEndElement();        
             


Mime
View raw message