Generate a Metadata Object from string in OpenSAML3
Brent Putman
putmanb at georgetown.edu
Wed Aug 14 16:32:20 EDT 2019
On 8/14/19 4:29 AM, DD K wrote:
> Hi All,
>
> What I'm currently trying is to migrate from OpenSAML2.x to
> OpenSAML3.x. Currently on OpenSAML2.x the code is as below:
>
Well that wasn't correct in the first place. At least not if you're
just trying to turn some XML you already have into an XMLObject tree.
If you have the XML for an existing EntityDescriptor or
EntitiesDescriptor element and just want to parse that into OpenSAML
representation, then you just parse and unmarshall. Exactly like what
you were doing in the earlier thread you posted for (I think)
AuthnRequest. Given that you were using the DOMMetadataProvider, you
were doing sort of doing that, but in a very roundabout and unnecessary
fashion.
>
> But I've struggled to find a resource on how to generate a
> EntityDescriptor to return from the method cause now there is no
> method such as /generateMetadata()/ in /DOMMetadataResolver/, keeping
> this apart
Right, the entire design and API of metadata providers changed in 3.x.
In 3.x it's entirely EntityDescirptor-centric (no more
EntitiesDescriptors are surfaced) and the API is about searching for
and returning 1 or more EntityDescriptors.
> there is a method called /resolveSingle()/ but it needs a
> /CriteriaSet(which i do not know what to include)/.
>
Right, in the new model you would supply criteria for the
EntityDescriptor(s) you want. In the common SSO use case, you usually
want just 1, based usually on entityID criteria.
If you want to see how that works, take a look at the relevant unit
tests, there's plenty of examples there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20190814/2634cf88/attachment.html>
More information about the dev
mailing list