KeyInfoBuilder in OpenSAML 3

Stephen.CTR.Chappell at faa.gov Stephen.CTR.Chappell at faa.gov
Thu Jun 11 08:37:11 EDT 2015


Hi Brent -

Thanx, I knew it had to be somewhere! Finding where things moved between v2 and v3 has been a bit of a challenge.

I'm not sure what you mean exactly by not making direct use of the -Builders. I'm doing something like this:

XMLObjectProviderRegistry xmlObjectRegistry = ConfigurationService.get(XMLObjectProviderRegistry.class);
XMLObjectBuilderFactory builderFactory = xmlObjectRegistry.getBuilderFactory();
...
KeyInfoBuilder kiBuilder = (KeyInfoBuilder) builderFactory.getBuilder(KeyInfo.DEFAULT_ELEMENT_NAME);
ki = (KeyInfo) kiBuilder.buildObject(KeyInfo.DEFAULT_ELEMENT_NAME);

And I follow the same pattern for Assertions and other stuff I need to build. I think that's in line with the v2 example you referenced?

Stephen W. Chappell

From: dev [mailto:dev-bounces at shibboleth.net] On Behalf Of Brent Putman
Sent: Wednesday, June 10, 2015 4:00 PM
To: dev at shibboleth.net
Subject: Re: KeyInfoBuilder in OpenSAML 3


On 6/10/15 3:03 PM, Stephen.CTR.Chappell at faa.gov<mailto:Stephen.CTR.Chappell at faa.gov> wrote:
I'm upleveling some code to OpenSAML3 that used the KeyInfoBuilder class. It looks like that class doesn't exist anymore?

No, it does exist. org.opensaml.xmlsec.signature.impl.KeyInfoBuilder in module opensaml-saml-impl.





Should I just use a XMLObjectBuilder<KeyInfo> instead?

I just mentioned this recently in another thread:


Btw, in both v2 and v3 we discourage direct use of the -Builder classes like that.  We recommend you obtain XMLObject builders, marshallers and unmarshallers via the registered providers.  In v2, builder usage:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromScratch

In v3, no wiki docs yet, but either use the global XMLObjectProviderRegistry via org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport, or the higher level methods on org.opensaml.core.xml.util.XMLObjectSupport.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20150611/5c353a1e/attachment.html>


More information about the dev mailing list