Skip to Content.
Sympa Menu

mace-opensaml-users - SAML Subject Output

Subject: OpenSAML user discussion

List archive

SAML Subject Output


Chronological Thread 
  • From: "Santosh Aithani" <>
  • To: <>
  • Subject: SAML Subject Output
  • Date: Mon, 26 Sep 2005 13:21:59 -0400
  • Importance: normal
  • Priority: normal

Title: SAML Subject Output

Hi All,

I have written a code to create SAML Subject using SAML OPen. The code is given below. But the output is different then what i want.

SAMLNameIdentifier nameIdentifier = new SAMLNameIdentifier(subjectName,"subjectNS","urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName");

Vector confirmationMethods = new Vector();
confirmationMethods.add("urn:oasis:names:tc:SAML:1.0:cm:artifact");
SAMLSubject subject = new SAMLSubject(nameIdentifier,confirmationMethods,null,null);

System.out.println(subject.toString());

And the output was :-

<Subject xmlns="urn:oasis:names:tc:SAML:1.0:assertion"><NameIdentifier Format="userid" NameQualifier="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName">anish</NameIdentifier>

<SubjectConfirmation><ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:artifact</ConfirmationMethod>
</SubjectConfirmation>
</Subject>

But the sample SAML Request that i have seen is like this

<saml:Subject>
<saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName" NameQualifier="subjectNS">uid=cstest3</saml:NameIdentifier>

<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:artifact</saml:ConfirmationMethod>
</saml:SubjectConfirmation>
</saml:Subject>

Can anyone let me know how to create the saml tag that is attached to the Subject element. or is it not necessary at all to have a <saml:> as a tagholder.

Thanks,
Santosh.



 
The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.
If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(17b)
 



Archive powered by MHonArc 2.6.16.

Top of Page