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 Summary

    Modifier and Type
    Method
    Description
    default org.codelibs.saml2.core.authn.AuthnRequest
    createAuthnRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.authn.AuthnRequestParams params)
    Creates an AuthnRequest instance.
    default org.codelibs.saml2.core.logout.LogoutRequest
    createIncomingLogoutRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
    Creates a LogoutRequest instance for an incoming request.
    default org.codelibs.saml2.core.logout.LogoutResponse
    createIncomingLogoutResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
    Creates a LogoutRequest instance for an incoming response.
    default org.codelibs.saml2.core.logout.LogoutRequest
    createOutgoingLogoutRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.logout.LogoutRequestParams params)
    Creates a LogoutRequest instance for an outgoing request.
    default org.codelibs.saml2.core.logout.LogoutResponse
    createOutgoingLogoutResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.logout.LogoutResponseParams params)
    Creates a LogoutResponse instance for an outgoing response.
    default org.codelibs.saml2.core.authn.SamlResponse
    createSamlResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
    Creates a SamlResponse instance.
  • Method Details

    • createAuthnRequest

      default org.codelibs.saml2.core.authn.AuthnRequest createAuthnRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.authn.AuthnRequestParams params)
      Creates an AuthnRequest instance.
      Parameters:
      settings - the settings
      params - the authentication request input parameters
      Returns:
      the created AuthnRequest instance
    • createSamlResponse

      default org.codelibs.saml2.core.authn.SamlResponse createSamlResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
      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 in case some error occurred while trying to create the SamlResponse instance
    • createOutgoingLogoutRequest

      default org.codelibs.saml2.core.logout.LogoutRequest createOutgoingLogoutRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.logout.LogoutRequestParams params)
      Creates a LogoutRequest instance for an outgoing request.
      Parameters:
      settings - the settings
      params - the logout request input parameters
      Returns:
      the created LogoutRequest instance
    • createIncomingLogoutRequest

      default org.codelibs.saml2.core.logout.LogoutRequest createIncomingLogoutRequest(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
      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 in case some error occurred while trying to create the LogoutRequest instance
    • createOutgoingLogoutResponse

      default org.codelibs.saml2.core.logout.LogoutResponse createOutgoingLogoutResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.logout.LogoutResponseParams params)
      Creates a LogoutResponse instance for an outgoing response.
      Parameters:
      settings - the settings
      params - the logout response input parameters
      Returns:
      the created LogoutResponse instance
    • createIncomingLogoutResponse

      default org.codelibs.saml2.core.logout.LogoutResponse createIncomingLogoutResponse(org.codelibs.saml2.core.settings.Saml2Settings settings, org.codelibs.saml2.core.http.HttpRequest request)
      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 in case some error occurred while trying to create the LogoutResponse instance