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:02:30 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1e7e0eeea -> 0024d9455


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

Branch: refs/heads/master
Commit: 0024d9455f7bd5f36e92c8cf1008aec6b8479e1e
Parents: 1e7e0ee
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:02:22 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/0024d945/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 8818e12..6b76879 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
@@ -35,6 +35,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;
@@ -196,6 +197,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