KeyDescriptor.getKeyInfo() always returns null
Huy Banh
huy.banh at userful.com
Mon Dec 9 10:05:02 EST 2019
am using OpenSaml in a SP project. I want to get IdP metadata, using
the following code snipet:
final BasicParserPool pool = new BasicParserPool();
pool.initialize();
final String idpUrl = "https://samltest.id/saml/idp";
final XMLObject xml = XMLObjectSupport.unmarshallFromInputStream(pool,
new URL(idpUrl).openStream());
final IDPSSODescriptor singleSignonDesc = ((EntityDescriptor)
xml).getIDPSSODescriptor(SAMLConstants.SAML20P_NS);
singleSignonDesc
.getKeyDescriptors()
.forEach(k -> System.out.println("Key info: " + k.getKeyInfo()));
All data is retrieved properly, except KeyDescriptor.getKeyInfo(). It
always returns null. Of course there is a key for each in metadata.
Would someone help me?
Thank you.
More information about the dev
mailing list