Class Saml2SpSsoInitiator

  • All Implemented Interfaces:
    Saml2SsoInitiator

    public class Saml2SpSsoInitiator
    extends Object
    implements Saml2SsoInitiator
    Initiates SAML2 single sign-on on the service provider side. This involves the creation of a SAML2 authentication request, saving it to CTS (so that necessary validations can be completed when the response is received), and constructs a callback that can be used by the authentication framework to trigger the SAML2 authentication.
    • Constructor Detail

      • Saml2SpSsoInitiator

        @Inject
        public Saml2SpSsoInitiator​(com.sun.identity.saml2.meta.SAML2MetaManager metaManager,
                                   org.forgerock.openam.headers.CookieUtilsWrapper cookieUtils,
                                   org.forgerock.am.saml2.impl.AuthnRequestUtils authnRequestUtils)
        Constructor.
        Parameters:
        metaManager - The SAML2 metadata manager.
        cookieUtils - Cookie utilities.
        authnRequestUtils - Authentication request utilities.
    • Method Detail

      • initiateSso

        public Callback initiateSso​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    Realm realm,
                                    String spEntityId,
                                    String idpEntityId,
                                    Options saml2Options)
                             throws Saml2SsoException
        Description copied from interface: Saml2SsoInitiator
        Initiates SAML2 SSO based on the provided parameters.
        Specified by:
        initiateSso in interface Saml2SsoInitiator
        Parameters:
        request - The HTTP request.
        response - The HTTP response.
        realm - The realm where the hosted service provider exists.
        spEntityId - The service provider's entity ID.
        idpEntityId - The identity provider's entity ID.
        saml2Options - Additional options that control how the SAML2 flow is initiated. See Saml2Options.
        Returns:
        The callback that can be used by the authentication framework to trigger the SAML SSO flow.
        Throws:
        Saml2SsoException - If there was an issue while initiating the SAML2 authentication process.