Skip to Content.
Sympa Menu

mace-opensaml-users - RE: ConfirmationMethod / -Data

Subject: OpenSAML user discussion

List archive

RE: ConfirmationMethod / -Data


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: "'Andreas Hänel'" <>, <>
  • Subject: RE: ConfirmationMethod / -Data
  • Date: Wed, 22 Jun 2005 11:04:12 -0400
  • Organization: The Ohio State University

> I'd like to use ConfirmationMethod and ConfirmationData Elements in
> connection with a SAMLSubject.
> I created a SAMLSubject called subject, now I am able to do:
>
> subject.addConformationMethod("URI");

You don't literally mean URI, right? Has to be some actual spec'd value. ;-)

> Now I'd like do
>
> subject.setConfirmationData(data);

Not the most well-evolved part of the code, nor well tested.

> but I am not familiar with the needed org.w3c.dom.Element, how do I
> create and add suiteable ConfirmationData?

You need to use DOM methods to construct the XML snippet to apply. The root
of the DOM is the saml:ConfirmationData element. If you don't understand how
to build a DOM, you should probably find a tutorial online on that. You need
to use a method to build a DOM Document, and the document has factory
methods to create other node types.

> (I think I have to use an implementation of that interface, like the
> apache one [org.apache.xerces.dom.ElementImpl], but therefor I need a
> CoreDocumentImpl)

No, you never use anything but the DOM interfaces themselves.

> P.S.: The ConfirmationData will look something like this :
> <node id="1001"/>

It'd be something like:

<get Document, which is only standardized in newer JAXP versions>
Element c = doc.createElementNS(XML.SAML_NS,"ConfirmationData");
c.setAttributeNS(NULL,"id","1001");

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page