mace-opensaml-users - Re: SAML Subject Output
Subject: OpenSAML user discussion
List archive
- From: Mintoo C <>
- To: Santosh Aithani <>
- Cc:
- Subject: Re: SAML Subject Output
- Date: Mon, 26 Sep 2005 14:30:34 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=lwhAWrkHOjvu5fcIyDLMFg50YrsD/CpdzyxJL/M1xf3r9QEaPi7YyGopManqvoPSJujVgEOm1HiwZd9ygHa12viefO6Iz149TUDaAOWJ4kBiOwQOyx5BhhuJFxjz7O3GI99v4dWLteqnLEutSBuE6ejt85f9awBb+2zglsgClHw=
Try using a XML as template and then edit the tag contents through Open SAML API.
Check the snippet below for reference:
samlLogger.debug("XML Request template - "+ textToSend);
File requestXML = new File(textToSend);
byte[] buf = textToSend.getBytes();
ByteArrayInputStream bais = new ByteArrayInputStream(buf,0,buf.length);
SAMLRequest samlrequest = new SAMLRequest(bais);
// massage the request
samlrequest.setIssueInstant(new Date(System.currentTimeMillis()));
//Replace the artifact
ArrayList artifacts = new ArrayList();
artifacts.add(artifact);
samlrequest.setArtifacts(artifacts);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
samlrequest.toStream(baos);
///make the call
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)
- SAML Subject Output, Santosh Aithani, 09/26/2005
- RE: SAML Subject Output, Scott Cantor, 09/26/2005
- Re: SAML Subject Output, Mintoo C, 09/26/2005
Archive powered by MHonArc 2.6.16.