How to create a valid SAML 2.0 Assertion with OpenSAML library in Java
问题 I am new to the OAuth2 concepts, SAML assertion and OpenSAML library in Java. I need my Java code to create a saml 2.0 assertions (may be XML string) using OpenSAML library. How we can create it? Please share the code and XML SAML 2.0 assertion. 回答1: I had created the SAML 2.0 assertions in my code using OpenSAML library (http://mvnrepository.com/artifact/org.opensaml/opensaml). The XML O/P is also shown below. import java.util.HashMap; import java.util.Iterator; import java.util.Map; import