문제

I'm using the opensaml for our application that acts as Service Provider. So far, I have been manually creating the SP Metadata.
Is there example in Java to show how to programatically generate Service Provider Metadata ?

도움이 되었습니까?

해결책

EntityDescriptor is the base of metadata, so thats what you start with, just add in the elements you whant by adding java object with usually the same name. Then you marshall the entitydescriptor and print xml.

I talk you through it on this blog page.

In my book, A Guide to OpenSAML, I have a lot of information and examples on OpenSAML.

EDIT New edition of the book is out, covering OpenSAML V3

다른 팁

In addition to Stefan Rasmusson's blog you can checkout Vladimir Shafer's sample application showing use of spring-security-saml2 integration with spring application has pre-written code for automated metadata generation and has clean GUI for testing it also.

Link to spring-security-saml sample application Github Repo
Link to MetadataGenerator Class

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top