Class SAML2Configuration

java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.client.config.BaseClientConfiguration
org.pac4j.saml.config.SAML2Configuration

public class SAML2Configuration extends org.pac4j.core.client.config.BaseClientConfiguration
The class is responsible for capturing client settings and passing them around.
Since:
1.7
Author:
Misagh Moayyed, Jerome Leleu
  • Field Details

    • DEFAULT_PROVIDER_NAME

      protected static final String DEFAULT_PROVIDER_NAME
      Constant DEFAULT_PROVIDER_NAME="pac4j-saml"
      See Also:
  • Constructor Details

    • SAML2Configuration

      public SAML2Configuration(String keystorePath, String keystorePassword, String privateKeyPassword, String identityProviderMetadataPath)

      Constructor for SAML2Configuration.

      Parameters:
      keystorePath - a String object
      keystorePassword - a String object
      privateKeyPassword - a String object
      identityProviderMetadataPath - a String object
    • SAML2Configuration

      public SAML2Configuration(org.springframework.core.io.Resource keystoreResource, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource)

      Constructor for SAML2Configuration.

      Parameters:
      keystoreResource - a Resource object
      keystorePassword - a String object
      privateKeyPassword - a String object
      identityProviderMetadataResource - a Resource object
    • SAML2Configuration

      public SAML2Configuration(org.springframework.core.io.Resource keystoreResource, String keyStoreAlias, String keyStoreType, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource)

      Constructor for SAML2Configuration.

      Parameters:
      keystoreResource - a Resource object
      keyStoreAlias - a String object
      keyStoreType - a String object
      keystorePassword - a String object
      privateKeyPassword - a String object
      identityProviderMetadataResource - a Resource object
    • SAML2Configuration

      protected SAML2Configuration(String keyStoreAlias, String keyStoreType, org.springframework.core.io.Resource keystoreResource, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource, String identityProviderEntityId, String serviceProviderEntityId, String providerName, Supplier<List<org.opensaml.core.xml.schema.XSAny>> authnRequestExtensions, String attributeAsId)

      Constructor for SAML2Configuration.

      Parameters:
      keyStoreAlias - a String object
      keyStoreType - a String object
      keystoreResource - a Resource object
      keystorePassword - a String object
      privateKeyPassword - a String object
      identityProviderMetadataResource - a Resource object
      identityProviderEntityId - a String object
      serviceProviderEntityId - a String object
      providerName - a String object
      authnRequestExtensions - a Supplier object
      attributeAsId - a String object
  • Method Details

    • setCallbackUrl

      public void setCallbackUrl(String callbackUrl)

      Setter for the field callbackUrl.

      Parameters:
      callbackUrl - a String object
    • internalInit

      protected void internalInit(boolean forceReinit)
      Specified by:
      internalInit in class org.pac4j.core.util.InitializableObject
    • getKeystoreGenerator

      public SAML2KeystoreGenerator getKeystoreGenerator()

      Getter for the field keystoreGenerator.

      Returns:
      a SAML2KeystoreGenerator object
    • setIdentityProviderMetadataResourceFilepath

      public void setIdentityProviderMetadataResourceFilepath(String path)

      setIdentityProviderMetadataResourceFilepath.

      Parameters:
      path - a String object
    • setIdentityProviderMetadataResourceClasspath

      public void setIdentityProviderMetadataResourceClasspath(String path)

      setIdentityProviderMetadataResourceClasspath.

      Parameters:
      path - a String object
    • setIdentityProviderMetadataResourceUrl

      public void setIdentityProviderMetadataResourceUrl(String url)

      setIdentityProviderMetadataResourceUrl.

      Parameters:
      url - a String object
    • setIdentityProviderMetadataPath

      public void setIdentityProviderMetadataPath(String path)

      setIdentityProviderMetadataPath.

      Parameters:
      path - a String object
    • setKeystoreResourceFilepath

      public void setKeystoreResourceFilepath(String path)

      setKeystoreResourceFilepath.

      Parameters:
      path - a String object
    • setKeystoreResourceClasspath

      public void setKeystoreResourceClasspath(String path)

      setKeystoreResourceClasspath.

      Parameters:
      path - a String object
    • setKeystoreResourceUrl

      public void setKeystoreResourceUrl(String url)

      setKeystoreResourceUrl.

      Parameters:
      url - a String object
    • setKeystorePath

      public void setKeystorePath(String path)

      setKeystorePath.

      Parameters:
      path - a String object
    • setServiceProviderMetadataResourceFilepath

      public void setServiceProviderMetadataResourceFilepath(String path)

      setServiceProviderMetadataResourceFilepath.

      Parameters:
      path - a String object
    • setServiceProviderMetadataPath

      public void setServiceProviderMetadataPath(String path)

      setServiceProviderMetadataPath.

      Parameters:
      path - a String object
    • getHttpClient

      public org.apache.hc.client5.http.classic.HttpClient getHttpClient()

      Getter for the field httpClient.

      Returns:
      a HttpClient object
    • getCredentialProvider

      public CredentialProvider getCredentialProvider()

      getCredentialProvider.

      Returns:
      a CredentialProvider object
    • toMetadataGenerator

      public SAML2MetadataGenerator toMetadataGenerator()

      toMetadataGenerator.

      Returns:
      a SAML2MetadataGenerator object
    • determineSingleSignOutServiceUrl

      protected void determineSingleSignOutServiceUrl(BaseSAML2MetadataGenerator generator)

      determineSingleSignOutServiceUrl.

      Parameters:
      generator - a BaseSAML2MetadataGenerator object
    • getMetadataGenerator

      public SAML2MetadataGenerator getMetadataGenerator()

      Getter for the field metadataGenerator.

      Returns:
      a SAML2MetadataGenerator object
    • getIdentityProviderMetadataResolver

      public SAML2MetadataResolver getIdentityProviderMetadataResolver()

      Getter for the field identityProviderMetadataResolver.

      Returns:
      a SAML2MetadataResolver object