Prepare SAML Authentication request using OpenSaml3.1.1

Brent Putman putmanb at georgetown.edu
Tue Jun 9 13:15:37 EDT 2015



On 6/9/15 3:27 AM, Surinaidu Majji wrote:
>
>  
>
> A) An alternative API to be used in OpenSAML 3.1.1 for
> "SecureRandomIdentifierGenerator" 
>
>  
>
>    A.1)Using Open SAML 2.6 Sample SessionID generation at SP(non
> shibboleth SP Component) is given below ::
>
>                
>
>    SecureRandomIdentifierGenerator generator = new
> SecureRandomIdentifierGenerator();
>
>     sessionId=generator.generateIdentifier();
>
>


>    A.2)Using Open SAML 3.1.1 ???
>



The v3 version is
net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy,
located in java-support. 



>  
>
> B) How to send SAML Request using Open SAML 3.1.1
>
>
>                 private AuthnRequest getAuthnRequest(DateTime
> issueInstant, Issuer issuer,
>
>                                                 String consumerUrl,
> String spUrl) {
>
>  
>
>                                 AuthnRequestBuilder authRequestBuilder
> = new AuthnRequestBuilder();
>
>                                 
>
>    B.2)Using Open SAML 3.1.1 ??? 
>
>

The package names have changed, it's now in
org.opensaml.saml.saml2.core.impl.AuthnRequestBuilder.   But otherwise I
believe should be exactly the same.  Are you not using Eclipse, or
another IDE?  It can help out with simple package import changes.

Btw, in both v2 and v3 we discourage direct use of the -Builder classes
like that.  We recommend you obtain XMLObject builders, marshallers and
unmarshallers via the registered providers.  In v2, builder usage:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromScratch

In v3, no wiki docs yet, but either use the global
XMLObjectProviderRegistry via
org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport, or the
higher level methods on org.opensaml.core.xml.util.XMLObjectSupport.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20150609/99fda2ca/attachment-0001.html>


More information about the dev mailing list