Accessing Metadata via Java
Ken Schwartzreich
shibboleth at CubicC.com
Sat Jan 28 20:55:23 GMT 2012
Hi, all. I want to programmatically retrieve the certificate (public
key) of a particular SP during an authentication session (because I
want to encrypt an attribute so that only they can ever decrypt it).
How can I do this?
I can get the IDP's certificate from my statically stored
ApplicationContext using:
((org.opensaml.xml.security.x509.X509Credential)((edu.internet2.middleware.shibboleth.common.relyingparty.provider.SAMLMDRelyingPartyConfigurationManager)appContext.getApplicationContext().getBean("shibboleth.RelyingPartyConfigurationManager")).getRelyingPartyConfigurations()
.get("default").getDefaultSigningCredential()).getEntityCertificate()
If I replace the get("default") with get(), it still returns the
same key to me.
Any suggestions?
Thanks!
-Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20120128/1782c7fa/attachment.html
More information about the dev
mailing list