cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Make sure delegation is only allowed if the token is valid for the SAML case
Date Mon, 09 Mar 2015 15:29:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes b2dc4d4dd -> 57822c1de


Make sure delegation is only allowed if the token is valid for the SAML case


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

Branch: refs/heads/3.0.x-fixes
Commit: 57822c1dea236b89df7413803afa1ce0ed7b2a55
Parents: b2dc4d4
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Mar 9 15:17:20 2015 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Mar 9 15:23:04 2015 +0000

----------------------------------------------------------------------
 .../apache/cxf/sts/token/delegation/SAMLDelegationHandler.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/57822c1d/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
index 8baf345..2d7ca3b 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/delegation/SAMLDelegationHandler.java
@@ -24,9 +24,9 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.sts.request.ReceivedToken;
+import org.apache.cxf.sts.request.ReceivedToken.STATE;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 import org.apache.wss4j.common.saml.builder.SAML1Constants;
@@ -66,7 +66,7 @@ public class SAMLDelegationHandler implements TokenDelegationHandler {
         ReceivedToken delegateTarget = tokenParameters.getToken();
         response.setToken(delegateTarget);
         
-        if (!delegateTarget.isDOMElement()) {
+        if (delegateTarget.getState() != STATE.VALID || !delegateTarget.isDOMElement()) {
             return response;
         }
         


Mime
View raw message