You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/09/21 16:47:06 UTC

[cxf-fediz] 03/05: Fixing some conflicts with the last patch

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 1.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf-fediz.git

commit 49cd1d716d0c803d8ec7e7082cbfcc54364f7bdf
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Sep 21 16:34:20 2018 +0100

    Fixing some conflicts with the last patch
---
 .../org/apache/cxf/fediz/core/federation/ClaimsProcessorTest.java    | 5 +++--
 .../apache/cxf/fediz/core/federation/SAMLTokenValidatorOldTest.java  | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/ClaimsProcessorTest.java b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/ClaimsProcessorTest.java
index 533d3e0..0d2043d 100644
--- a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/ClaimsProcessorTest.java
+++ b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/ClaimsProcessorTest.java
@@ -70,6 +70,7 @@ import org.apache.wss4j.common.saml.bean.AudienceRestrictionBean;
 import org.apache.wss4j.common.saml.bean.ConditionsBean;
 import org.apache.wss4j.common.saml.builder.SAML2Constants;
 import org.apache.wss4j.common.util.DOM2Writer;
+import org.apache.wss4j.common.util.XMLUtils;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -327,10 +328,10 @@ public class ClaimsProcessorTest {
         Document doc = STSUtil.toSOAPPart(rstr);
         Element token = assertion.toDOM(doc);
 
-        Element e = SAMLTokenValidatorOldTest.findElement(doc, "RequestedSecurityToken",
+        Element e = XMLUtils.findElement(doc, "RequestedSecurityToken",
                                                         FederationConstants.WS_TRUST_13_NS);
         if (e == null) {
-            e = SAMLTokenValidatorOldTest.findElement(doc, "RequestedSecurityToken",
+            e = XMLUtils.findElement(doc, "RequestedSecurityToken",
                                                     FederationConstants.WS_TRUST_2005_02_NS);
         }
         e.appendChild(token);
diff --git a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/SAMLTokenValidatorOldTest.java b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/SAMLTokenValidatorOldTest.java
index 4c4ab6f..b5baa6b 100644
--- a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/SAMLTokenValidatorOldTest.java
+++ b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/SAMLTokenValidatorOldTest.java
@@ -155,7 +155,7 @@ public class SAMLTokenValidatorOldTest {
         Assert.assertEquals("Two roles must be found", 2, wfRes.getRoles()
                             .size());
         Assert.assertEquals("Audience wrong", TEST_AUDIENCE, wfRes.getAudience());
-        assertClaims(wfRes.getClaims(), callbackHandler.getRoleAttributeName());
+        assertClaims(wfRes.getClaims(), ClaimTypes.URI_BASE.toString() + "/" + callbackHandler.getRoleAttributeName());
 
     }
 
@@ -289,7 +289,7 @@ public class SAMLTokenValidatorOldTest {
         Assert.assertEquals("Two roles must be found", 2, wfRes.getRoles()
                             .size());
         Assert.assertEquals("Audience wrong", TEST_AUDIENCE, wfRes.getAudience());
-        assertClaims(wfRes.getClaims(), callbackHandler.getRoleAttributeName());
+        assertClaims(wfRes.getClaims(), ClaimTypes.URI_BASE.toString() + "/" + callbackHandler.getRoleAttributeName());
     }