Package org.pac4j.saml.config
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
ConstantDEFAULT_PROVIDER_NAME="pac4j-saml"
-
Constructor Summary
ConstructorsModifierConstructorDescriptionSAML2Configuration
(String keystorePath, String keystorePassword, String privateKeyPassword, String identityProviderMetadataPath) Constructor for 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.SAML2Configuration
(org.springframework.core.io.Resource keystoreResource, String keyStoreAlias, String keyStoreType, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource) Constructor for SAML2Configuration.SAML2Configuration
(org.springframework.core.io.Resource keystoreResource, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource) Constructor for SAML2Configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
determineSingleSignOutServiceUrl.getCredentialProvider.org.apache.hc.client5.http.classic.HttpClient
Getter for the fieldhttpClient
.Getter for the fieldidentityProviderMetadataResolver
.Getter for the fieldkeystoreGenerator
.Getter for the fieldmetadataGenerator
.protected void
internalInit
(boolean forceReinit) void
setCallbackUrl
(String callbackUrl) Setter for the fieldcallbackUrl
.void
setIdentityProviderMetadataPath.void
setIdentityProviderMetadataResourceClasspath.void
setIdentityProviderMetadataResourceFilepath.void
setIdentityProviderMetadataResourceUrl.void
setKeystorePath
(String path) setKeystorePath.void
setKeystoreResourceClasspath.void
setKeystoreResourceFilepath.void
setKeystoreResourceUrl.void
setServiceProviderMetadataPath.void
setServiceProviderMetadataResourceFilepath.toMetadataGenerator.Methods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getInitialized, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize, toString
-
Field Details
-
DEFAULT_PROVIDER_NAME
ConstantDEFAULT_PROVIDER_NAME="pac4j-saml"
- See Also:
-
-
Constructor Details
-
SAML2Configuration
public SAML2Configuration(String keystorePath, String keystorePassword, String privateKeyPassword, String identityProviderMetadataPath) Constructor for SAML2Configuration.
-
SAML2Configuration
public SAML2Configuration(org.springframework.core.io.Resource keystoreResource, String keystorePassword, String privateKeyPassword, org.springframework.core.io.Resource identityProviderMetadataResource) Constructor for SAML2Configuration.
-
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.
-
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
- aString
objectkeyStoreType
- aString
objectkeystoreResource
- aResource
objectkeystorePassword
- aString
objectprivateKeyPassword
- aString
objectidentityProviderMetadataResource
- aResource
objectidentityProviderEntityId
- aString
objectserviceProviderEntityId
- aString
objectproviderName
- aString
objectauthnRequestExtensions
- aSupplier
objectattributeAsId
- aString
object
-
-
Method Details
-
setCallbackUrl
Setter for the field
callbackUrl
.- Parameters:
callbackUrl
- aString
object
-
internalInit
protected void internalInit(boolean forceReinit) - Specified by:
internalInit
in classorg.pac4j.core.util.InitializableObject
-
getKeystoreGenerator
Getter for the field
keystoreGenerator
.- Returns:
- a
SAML2KeystoreGenerator
object
-
setIdentityProviderMetadataResourceFilepath
setIdentityProviderMetadataResourceFilepath.
- Parameters:
path
- aString
object
-
setIdentityProviderMetadataResourceClasspath
setIdentityProviderMetadataResourceClasspath.
- Parameters:
path
- aString
object
-
setIdentityProviderMetadataResourceUrl
setIdentityProviderMetadataResourceUrl.
- Parameters:
url
- aString
object
-
setIdentityProviderMetadataPath
setIdentityProviderMetadataPath.
- Parameters:
path
- aString
object
-
setKeystoreResourceFilepath
setKeystoreResourceFilepath.
- Parameters:
path
- aString
object
-
setKeystoreResourceClasspath
setKeystoreResourceClasspath.
- Parameters:
path
- aString
object
-
setKeystoreResourceUrl
setKeystoreResourceUrl.
- Parameters:
url
- aString
object
-
setKeystorePath
setKeystorePath.
- Parameters:
path
- aString
object
-
setServiceProviderMetadataResourceFilepath
setServiceProviderMetadataResourceFilepath.
- Parameters:
path
- aString
object
-
setServiceProviderMetadataPath
setServiceProviderMetadataPath.
- Parameters:
path
- aString
object
-
getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient()Getter for the field
httpClient
.- Returns:
- a
HttpClient
object
-
getCredentialProvider
getCredentialProvider.
- Returns:
- a
CredentialProvider
object
-
toMetadataGenerator
toMetadataGenerator.
- Returns:
- a
SAML2MetadataGenerator
object
-
determineSingleSignOutServiceUrl
determineSingleSignOutServiceUrl.
- Parameters:
generator
- aBaseSAML2MetadataGenerator
object
-
getMetadataGenerator
Getter for the field
metadataGenerator
.- Returns:
- a
SAML2MetadataGenerator
object
-
getIdentityProviderMetadataResolver
Getter for the field
identityProviderMetadataResolver
.- Returns:
- a
SAML2MetadataResolver
object
-