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 StringConstantDEFAULT_PROVIDER_NAME="pac4j-saml" -
Constructor Summary
ConstructorsModifierConstructorDescriptionSAML2Configuration(String keystorePath, String keystorePassword, String privateKeyPassword, String identityProviderMetadataPath) Constructor for SAML2Configuration.protectedSAML2Configuration(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 voiddetermineSingleSignOutServiceUrl.getCredentialProvider.org.apache.hc.client5.http.classic.HttpClientGetter for the fieldhttpClient.Getter for the fieldidentityProviderMetadataResolver.Getter for the fieldkeystoreGenerator.Getter for the fieldmetadataGenerator.protected voidinternalInit(boolean forceReinit) voidsetCallbackUrl(String callbackUrl) Setter for the fieldcallbackUrl.voidsetIdentityProviderMetadataPath.voidsetIdentityProviderMetadataResourceClasspath.voidsetIdentityProviderMetadataResourceFilepath.voidsetIdentityProviderMetadataResourceUrl.voidsetKeystorePath(String path) setKeystorePath.voidsetKeystoreResourceClasspath.voidsetKeystoreResourceFilepath.voidsetKeystoreResourceUrl.voidsetServiceProviderMetadataPath.voidsetServiceProviderMetadataResourceFilepath.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- aStringobjectkeyStoreType- aStringobjectkeystoreResource- aResourceobjectkeystorePassword- aStringobjectprivateKeyPassword- aStringobjectidentityProviderMetadataResource- aResourceobjectidentityProviderEntityId- aStringobjectserviceProviderEntityId- aStringobjectproviderName- aStringobjectauthnRequestExtensions- aSupplierobjectattributeAsId- aStringobject
-
-
Method Details
-
setCallbackUrl
Setter for the field
callbackUrl.- Parameters:
callbackUrl- aStringobject
-
internalInit
protected void internalInit(boolean forceReinit) - Specified by:
internalInitin classorg.pac4j.core.util.InitializableObject
-
getKeystoreGenerator
Getter for the field
keystoreGenerator.- Returns:
- a
SAML2KeystoreGeneratorobject
-
setIdentityProviderMetadataResourceFilepath
setIdentityProviderMetadataResourceFilepath.
- Parameters:
path- aStringobject
-
setIdentityProviderMetadataResourceClasspath
setIdentityProviderMetadataResourceClasspath.
- Parameters:
path- aStringobject
-
setIdentityProviderMetadataResourceUrl
setIdentityProviderMetadataResourceUrl.
- Parameters:
url- aStringobject
-
setIdentityProviderMetadataPath
setIdentityProviderMetadataPath.
- Parameters:
path- aStringobject
-
setKeystoreResourceFilepath
setKeystoreResourceFilepath.
- Parameters:
path- aStringobject
-
setKeystoreResourceClasspath
setKeystoreResourceClasspath.
- Parameters:
path- aStringobject
-
setKeystoreResourceUrl
setKeystoreResourceUrl.
- Parameters:
url- aStringobject
-
setKeystorePath
setKeystorePath.
- Parameters:
path- aStringobject
-
setServiceProviderMetadataResourceFilepath
setServiceProviderMetadataResourceFilepath.
- Parameters:
path- aStringobject
-
setServiceProviderMetadataPath
setServiceProviderMetadataPath.
- Parameters:
path- aStringobject
-
getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient()Getter for the field
httpClient.- Returns:
- a
HttpClientobject
-
getCredentialProvider
getCredentialProvider.
- Returns:
- a
CredentialProviderobject
-
toMetadataGenerator
toMetadataGenerator.
- Returns:
- a
SAML2MetadataGeneratorobject
-
determineSingleSignOutServiceUrl
determineSingleSignOutServiceUrl.
- Parameters:
generator- aBaseSAML2MetadataGeneratorobject
-
getMetadataGenerator
Getter for the field
metadataGenerator.- Returns:
- a
SAML2MetadataGeneratorobject
-
getIdentityProviderMetadataResolver
Getter for the field
identityProviderMetadataResolver.- Returns:
- a
SAML2MetadataResolverobject
-