Author: anil.saldhana(a)jboss.com
Date: 2012-02-22 13:49:45 -0500 (Wed, 22 Feb 2012)
New Revision: 1430
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml2/saml2-assertion-subjectconfirmation.xml
Log:
update test to see if we handle nameid under subject properly
Modified:
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java 2012-02-22
15:25:43 UTC (rev 1429)
+++
federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/SAMLAssertionParserTestCase.java 2012-02-22
18:49:45 UTC (rev 1430)
@@ -243,7 +243,11 @@
AssertionType assertion = (AssertionType) parser.parse(configStream);
assertNotNull(assertion);
- List<SubjectConfirmationType> subjectConfirmationTypes =
assertion.getSubject().getConfirmation();
+ SubjectType subjectType = assertion.getSubject();
+ STSubType stType = subjectType.getSubType();
+ assertEquals("A_DUDE", ((NameIDType) stType.getBaseID()).getValue());
+
+ List<SubjectConfirmationType> subjectConfirmationTypes =
subjectType.getConfirmation();
assertNotNull(subjectConfirmationTypes);
assertEquals(1, subjectConfirmationTypes.size());
SubjectConfirmationType sct = subjectConfirmationTypes.get(0);
@@ -251,6 +255,7 @@
NameIDType nameID = sct.getNameID();
assertNotNull(nameID);
assertEquals("CN=theDUDE", nameID.getValue());
+
}
/**
Modified:
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml2/saml2-assertion-subjectconfirmation.xml
===================================================================
---
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml2/saml2-assertion-subjectconfirmation.xml 2012-02-22
15:25:43 UTC (rev 1429)
+++
federation/trunk/picketlink-fed-core/src/test/resources/parser/saml2/saml2-assertion-subjectconfirmation.xml 2012-02-22
18:49:45 UTC (rev 1430)
@@ -4,6 +4,7 @@
<saml2:Issuer>TheDUDE</saml2:Issuer>
<saml2:Subject>
+ <saml2:NameID
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">A_DUDE</saml2:NameID>
<saml2:SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches">
<saml2:NameID>CN=theDUDE</saml2:NameID>
Show replies by date