Interface SamlMessageFactory


  • public interface SamlMessageFactory
    Factory which can create all kind of SAML message objects.

    One such factory is used by the Auth class to orchestrate login and logout operations.

    Default implementations for all creation methods are provided: they create instances of the standard classes provided by the library. Any extension class may simply override the desired creation methods in order to return instances of custom extensions of those standard classes.

    • Method Detail

      • createSamlResponse

        default SamlResponse createSamlResponse​(Saml2Settings settings,
                                                HttpRequest request)
                                         throws java.lang.Exception
        Creates a SamlResponse instance.
        Parameters:
        settings - the settings
        request - the HTTP request from which the response is to be extracted and parsed
        Returns:
        the created SamlResponse instance
        Throws:
        java.lang.Exception - in case some error occurred while trying to create the SamlResponse instance
      • createIncomingLogoutRequest

        default LogoutRequest createIncomingLogoutRequest​(Saml2Settings settings,
                                                          HttpRequest request)
                                                   throws java.lang.Exception
        Creates a LogoutRequest instance for an incoming request.
        Parameters:
        settings - the settings
        request - the HTTP request from which the logout request is to be extracted and parsed
        Returns:
        the created LogoutRequest instance
        Throws:
        java.lang.Exception - in case some error occurred while trying to create the LogoutRequest instance
      • createIncomingLogoutResponse

        default LogoutResponse createIncomingLogoutResponse​(Saml2Settings settings,
                                                            HttpRequest request)
                                                     throws java.lang.Exception
        Creates a LogoutRequest instance for an incoming response.
        Parameters:
        settings - the settings
        request - the HTTP request from which the logout response is to be extracted and parsed
        Returns:
        the created LogoutResponse instance
        Throws:
        java.lang.Exception - in case some error occurred while trying to create the LogoutResponse instance