cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: [CXF-6048] - Minor change to last commit
Date Mon, 13 Oct 2014 16:31:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 588ab66d8 -> d54014582


[CXF-6048] - Minor change to last commit


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

Branch: refs/heads/3.0.x-fixes
Commit: d54014582e89550ba02b033dcc0d4aa6ca412f90
Parents: 588ab66
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Oct 13 17:28:59 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Oct 13 17:31:05 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/ws/security/trust/STSTokenValidator.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d5401458/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
index 686933d..4f001f7 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSTokenValidator.java
@@ -28,7 +28,6 @@ import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.EndpointInfo;
@@ -38,6 +37,7 @@ import org.apache.cxf.ws.security.tokenstore.TokenStore;
 import org.apache.cxf.ws.security.tokenstore.TokenStoreFactory;
 import org.apache.cxf.ws.security.trust.delegation.DelegationCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.common.principal.SAMLTokenPrincipalImpl;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.dom.handler.RequestData;
 import org.apache.wss4j.dom.validate.Credential;
@@ -103,6 +103,7 @@ public class STSTokenValidator implements Validator {
                 SecurityToken transformedToken = getTransformedToken(tokenStore, hash);
                 if (transformedToken != null && !transformedToken.isExpired()) {
                     SamlAssertionWrapper assertion = new SamlAssertionWrapper(transformedToken.getToken());
+                    credential.setPrincipal(new SAMLTokenPrincipalImpl(assertion));
                     credential.setTransformedToken(assertion);
                     return credential;
                 }
@@ -128,6 +129,7 @@ public class STSTokenValidator implements Validator {
                 if (returnedToken != token) {
                     SamlAssertionWrapper assertion = new SamlAssertionWrapper(returnedToken.getToken());
                     credential.setTransformedToken(assertion);
+                    credential.setPrincipal(new SAMLTokenPrincipalImpl(assertion));
                     if (hash != 0) {
                         tokenStore.add(returnedToken);
                         token.setTransformedTokenIdentifier(returnedToken.getId());


Mime
View raw message