Package com.onelogin.saml2.settings
Class Saml2Settings
- java.lang.Object
-
- com.onelogin.saml2.settings.Saml2Settings
-
public class Saml2Settings extends java.lang.ObjectSaml2Settings class of OneLogin's Java Toolkit. A class that implements the settings handler
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowRepeatAttributeNameprivate booleanauthnRequestsSignedprivate booleancompressRequestprivate booleancompressResponseprivate java.util.List<Contact>contactsprivate booleandebugprivate java.lang.StringdigestAlgorithmprivate HSMhsmprivate java.lang.StringidpCertFingerprintprivate java.lang.StringidpCertFingerprintAlgorithmprivate java.lang.StringidpEntityIdprivate java.lang.StringidpSingleLogoutServiceBindingprivate java.net.URLidpSingleLogoutServiceResponseUrlprivate java.net.URLidpSingleLogoutServiceUrlprivate java.lang.StringidpSingleSignOnServiceBindingprivate java.net.URLidpSingleSignOnServiceUrlprivate java.security.cert.X509Certificateidpx509certprivate java.util.List<java.security.cert.X509Certificate>idpx509certMultiprivate static org.slf4j.LoggerLOGGERPrivate property to construct a logger for this class.private booleanlogoutRequestSignedprivate booleanlogoutResponseSignedprivate booleannameIdEncryptedprivate Organizationorganizationprivate booleanrejectDeprecatedAlgprivate booleanrejectUnsolicitedResponsesWithInResponseToprivate java.util.List<java.lang.String>requestedAuthnContextprivate java.lang.StringrequestedAuthnContextComparisonprivate java.lang.StringsignatureAlgorithmprivate booleansignMetadataprivate java.lang.StringspAssertionConsumerServiceBindingprivate java.net.URLspAssertionConsumerServiceUrlprivate java.lang.StringspEntityIdprivate java.lang.StringspNameIDFormatprivate java.security.PrivateKeyspPrivateKeyprivate java.lang.StringspSingleLogoutServiceBindingprivate java.net.URLspSingleLogoutServiceUrlprivate booleanspValidationOnlyprivate java.security.cert.X509CertificatespX509certprivate java.security.cert.X509CertificatespX509certNewprivate booleanstrictprivate booleantrimAttributeValuesprivate booleantrimNameIdsprivate java.lang.StringuniqueIDPrefixprivate booleanwantAssertionsEncryptedprivate booleanwantAssertionsSignedprivate booleanwantMessagesSignedprivate booleanwantNameIdprivate booleanwantNameIdEncryptedprivate booleanwantXMLValidation
-
Constructor Summary
Constructors Constructor Description Saml2Settings()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>checkIdPSettings()Checks the IdP settings .private booleancheckIdpx509certRequired()Auxiliary method to check Idp certificate is configured.private booleancheckRequired(java.lang.Object value)Auxiliary method to check required properties.java.util.List<java.lang.String>checkSettings()Checks the settings .booleancheckSPCerts()Checks the x509 certficate/private key SP settings .java.util.List<java.lang.String>checkSPSettings()Checks the SP settings .booleangetAuthnRequestsSigned()java.util.List<Contact>getContacts()java.lang.StringgetDigestAlgorithm()HSMgetHsm()java.lang.StringgetIdpCertFingerprint()java.lang.StringgetIdpCertFingerprintAlgorithm()java.lang.StringgetIdpEntityId()java.lang.StringgetIdpSingleLogoutServiceBinding()java.net.URLgetIdpSingleLogoutServiceResponseUrl()java.net.URLgetIdpSingleLogoutServiceUrl()java.lang.StringgetIdpSingleSignOnServiceBinding()java.net.URLgetIdpSingleSignOnServiceUrl()java.security.cert.X509CertificategetIdpx509cert()java.util.List<java.security.cert.X509Certificate>getIdpx509certMulti()booleangetLogoutRequestSigned()booleangetLogoutResponseSigned()booleangetNameIdEncrypted()OrganizationgetOrganization()booleangetRejectDeprecatedAlg()java.util.List<java.lang.String>getRequestedAuthnContext()java.lang.StringgetRequestedAuthnContextComparison()java.lang.StringgetSignatureAlgorithm()booleangetSignMetadata()java.lang.StringgetSpAssertionConsumerServiceBinding()java.net.URLgetSpAssertionConsumerServiceUrl()java.security.cert.X509CertificategetSPcert()java.security.cert.X509CertificategetSPcertNew()java.lang.StringgetSpEntityId()java.security.PrivateKeygetSPkey()java.lang.StringgetSPMetadata()Gets the SP metadata.java.lang.StringgetSpNameIDFormat()java.lang.StringgetSpSingleLogoutServiceBinding()java.net.URLgetSpSingleLogoutServiceUrl()booleangetSPValidationOnly()java.lang.StringgetUniqueIDPrefix()booleangetWantAssertionsEncrypted()booleangetWantAssertionsSigned()booleangetWantMessagesSigned()booleangetWantNameId()booleangetWantNameIdEncrypted()booleangetWantXMLValidation()booleanisAllowRepeatAttributeName()booleanisCompressRequestEnabled()booleanisCompressResponseEnabled()booleanisDebugActive()booleanisRejectUnsolicitedResponsesWithInResponseTo()booleanisStrict()booleanisTrimAttributeValues()Determines whether attribute values should be trimmed when extracting them from parsed SAML messages.booleanisTrimNameIds()Determines whether Name IDs should trimmed when extracting them from parsed SAML messages.voidsetAllowRepeatAttributeName(boolean allowRepeatAttributeName)Set the allowRepeatAttributeName setting valuevoidsetAuthnRequestsSigned(boolean authnRequestsSigned)Set the authnRequestsSigned setting valuevoidsetCompressRequest(boolean compressRequest)Set the compressRequest setting valuevoidsetCompressResponse(boolean compressResponse)Set the compressResponse setting valueprotected voidsetContacts(java.util.List<Contact> contacts)Set contacts info that will be listed on the Service Provider metadatavoidsetDebug(boolean debug)Set the debug setting valuevoidsetDigestAlgorithm(java.lang.String digestAlgorithm)Set the digestAlgorithm setting valuevoidsetHsm(HSM hsm)Sets the HSM setting value.protected voidsetIdpCertFingerprint(java.lang.String idpCertFingerprint)Set the idpCertFingerprint setting valueprotected voidsetIdpCertFingerprintAlgorithm(java.lang.String idpCertFingerprintAlgorithm)Set the idpCertFingerprintAlgorithm setting valueprotected voidsetIdpEntityId(java.lang.String idpEntityId)Set the idpEntityId setting valueprotected voidsetIdpSingleLogoutServiceBinding(java.lang.String idpSingleLogoutServiceBinding)Set the idpSingleLogoutServiceBinding setting valueprotected voidsetIdpSingleLogoutServiceResponseUrl(java.net.URL idpSingleLogoutServiceResponseUrl)Set the idpSingleLogoutServiceUrl setting valueprotected voidsetIdpSingleLogoutServiceUrl(java.net.URL idpSingleLogoutServiceUrl)Set the idpSingleLogoutServiceUrl setting valueprotected voidsetIdpSingleSignOnServiceBinding(java.lang.String idpSingleSignOnServiceBinding)Set the idpSingleSignOnServiceBinding setting valueprotected voidsetIdpSingleSignOnServiceUrl(java.net.URL idpSingleSignOnServiceUrl)Set the idpSingleSignOnServiceUrl setting valueprotected voidsetIdpx509cert(java.security.cert.X509Certificate idpX509cert)Set the idpX509cert setting value provided as a X509Certificate objectvoidsetIdpx509certMulti(java.util.List<java.security.cert.X509Certificate> idpx509certMulti)Set the idpx509certMulti setting valuevoidsetLogoutRequestSigned(boolean logoutRequestSigned)Set the logoutRequestSigned setting valuevoidsetLogoutResponseSigned(boolean logoutResponseSigned)Set the logoutResponseSigned setting valuevoidsetNameIdEncrypted(boolean nameIdEncrypted)Set the nameIdEncrypted setting valueprotected voidsetOrganization(Organization organization)Set the organization info that will be published on the Service Provider metadatavoidsetRejectDeprecatedAlg(boolean rejectDeprecatedAlg)Set the rejectDeprecatedAlg setting valuevoidsetRejectUnsolicitedResponsesWithInResponseTo(boolean rejectUnsolicitedResponsesWithInResponseTo)Controls if unsolicited Responses are rejected if they contain an InResponseTo value.voidsetRequestedAuthnContext(java.util.List<java.lang.String> requestedAuthnContext)Set the requestedAuthnContext setting valuevoidsetRequestedAuthnContextComparison(java.lang.String requestedAuthnContextComparison)Set the requestedAuthnContextComparison setting valuevoidsetSignatureAlgorithm(java.lang.String signatureAlgorithm)Set the signatureAlgorithm setting valuevoidsetSignMetadata(boolean signMetadata)Set the signMetadata setting valueprotected voidsetSpAssertionConsumerServiceBinding(java.lang.String spAssertionConsumerServiceBinding)Set the spAssertionConsumerServiceBinding setting valueprotected voidsetSpAssertionConsumerServiceUrl(java.net.URL spAssertionConsumerServiceUrl)Set the spAssertionConsumerServiceUrl setting valueprotected voidsetSpEntityId(java.lang.String spEntityId)Set the spEntityId setting valueprotected voidsetSpNameIDFormat(java.lang.String spNameIDFormat)Set the spNameIDFormat setting valueprotected voidsetSpPrivateKey(java.security.PrivateKey spPrivateKey)Set the spPrivateKey setting value provided as a PrivateKey objectprotected voidsetSpSingleLogoutServiceBinding(java.lang.String spSingleLogoutServiceBinding)Set the spSingleLogoutServiceBinding setting valueprotected voidsetSpSingleLogoutServiceUrl(java.net.URL spSingleLogoutServiceUrl)Set the spSingleLogoutServiceUrl setting valuevoidsetSPValidationOnly(boolean spValidationOnly)Set the spValidationOnly value, used to check IdP data on checkSettings methodprotected voidsetSpX509cert(java.security.cert.X509Certificate spX509cert)Set the spX509cert setting value provided as X509Certificate objectprotected voidsetSpX509certNew(java.security.cert.X509Certificate spX509certNew)Set the spX509certNew setting value provided as X509Certificate objectvoidsetStrict(boolean strict)Set the strict setting valuevoidsetTrimAttributeValues(boolean trimAttributeValues)Sets whether attribute values in parsed SAML messages should be trimmed.voidsetTrimNameIds(boolean trimNameIds)Sets whether Name IDs in parsed SAML messages should be trimmed.protected voidsetUniqueIDPrefix(java.lang.String uniqueIDPrefix)Set the uniqueIDPrefix setting valuevoidsetWantAssertionsEncrypted(boolean wantAssertionsEncrypted)Set the wantAssertionsEncrypted setting valuevoidsetWantAssertionsSigned(boolean wantAssertionsSigned)Set the wantAssertionsSigned setting valuevoidsetWantMessagesSigned(boolean wantMessagesSigned)Set the wantMessagesSigned setting valuevoidsetWantNameId(boolean wantNameId)Set the wantNameId setting valuevoidsetWantNameIdEncrypted(boolean wantNameIdEncrypted)Set the wantNameIdEncrypted setting valuevoidsetWantXMLValidation(boolean wantXMLValidation)Set the wantXMLValidation setting valuestatic java.util.List<java.lang.String>validateMetadata(java.lang.String metadataString)Validates an XML SP Metadata.
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
Private property to construct a logger for this class.
-
strict
private boolean strict
-
debug
private boolean debug
-
spEntityId
private java.lang.String spEntityId
-
spAssertionConsumerServiceUrl
private java.net.URL spAssertionConsumerServiceUrl
-
spAssertionConsumerServiceBinding
private java.lang.String spAssertionConsumerServiceBinding
-
spSingleLogoutServiceUrl
private java.net.URL spSingleLogoutServiceUrl
-
spSingleLogoutServiceBinding
private java.lang.String spSingleLogoutServiceBinding
-
spNameIDFormat
private java.lang.String spNameIDFormat
-
spX509cert
private java.security.cert.X509Certificate spX509cert
-
spX509certNew
private java.security.cert.X509Certificate spX509certNew
-
spPrivateKey
private java.security.PrivateKey spPrivateKey
-
hsm
private HSM hsm
-
idpEntityId
private java.lang.String idpEntityId
-
idpSingleSignOnServiceUrl
private java.net.URL idpSingleSignOnServiceUrl
-
idpSingleSignOnServiceBinding
private java.lang.String idpSingleSignOnServiceBinding
-
idpSingleLogoutServiceUrl
private java.net.URL idpSingleLogoutServiceUrl
-
idpSingleLogoutServiceResponseUrl
private java.net.URL idpSingleLogoutServiceResponseUrl
-
idpSingleLogoutServiceBinding
private java.lang.String idpSingleLogoutServiceBinding
-
idpx509cert
private java.security.cert.X509Certificate idpx509cert
-
idpx509certMulti
private java.util.List<java.security.cert.X509Certificate> idpx509certMulti
-
idpCertFingerprint
private java.lang.String idpCertFingerprint
-
idpCertFingerprintAlgorithm
private java.lang.String idpCertFingerprintAlgorithm
-
nameIdEncrypted
private boolean nameIdEncrypted
-
authnRequestsSigned
private boolean authnRequestsSigned
-
logoutRequestSigned
private boolean logoutRequestSigned
-
logoutResponseSigned
private boolean logoutResponseSigned
-
wantMessagesSigned
private boolean wantMessagesSigned
-
wantAssertionsSigned
private boolean wantAssertionsSigned
-
wantAssertionsEncrypted
private boolean wantAssertionsEncrypted
-
wantNameId
private boolean wantNameId
-
wantNameIdEncrypted
private boolean wantNameIdEncrypted
-
signMetadata
private boolean signMetadata
-
requestedAuthnContext
private java.util.List<java.lang.String> requestedAuthnContext
-
requestedAuthnContextComparison
private java.lang.String requestedAuthnContextComparison
-
wantXMLValidation
private boolean wantXMLValidation
-
signatureAlgorithm
private java.lang.String signatureAlgorithm
-
digestAlgorithm
private java.lang.String digestAlgorithm
-
rejectUnsolicitedResponsesWithInResponseTo
private boolean rejectUnsolicitedResponsesWithInResponseTo
-
allowRepeatAttributeName
private boolean allowRepeatAttributeName
-
rejectDeprecatedAlg
private boolean rejectDeprecatedAlg
-
uniqueIDPrefix
private java.lang.String uniqueIDPrefix
-
compressRequest
private boolean compressRequest
-
compressResponse
private boolean compressResponse
-
trimNameIds
private boolean trimNameIds
-
trimAttributeValues
private boolean trimAttributeValues
-
contacts
private java.util.List<Contact> contacts
-
organization
private Organization organization
-
spValidationOnly
private boolean spValidationOnly
-
-
Method Detail
-
isStrict
public final boolean isStrict()
- Returns:
- the strict setting value
-
getSpEntityId
public final java.lang.String getSpEntityId()
- Returns:
- the spEntityId setting value
-
getSpAssertionConsumerServiceUrl
public final java.net.URL getSpAssertionConsumerServiceUrl()
- Returns:
- the spAssertionConsumerServiceUrl
-
getSpAssertionConsumerServiceBinding
public final java.lang.String getSpAssertionConsumerServiceBinding()
- Returns:
- the spAssertionConsumerServiceBinding setting value
-
getSpSingleLogoutServiceUrl
public final java.net.URL getSpSingleLogoutServiceUrl()
- Returns:
- the spSingleLogoutServiceUrl setting value
-
getSpSingleLogoutServiceBinding
public final java.lang.String getSpSingleLogoutServiceBinding()
- Returns:
- the spSingleLogoutServiceBinding setting value
-
getSpNameIDFormat
public final java.lang.String getSpNameIDFormat()
- Returns:
- the spNameIDFormat setting value
-
isAllowRepeatAttributeName
public boolean isAllowRepeatAttributeName()
- Returns:
- the allowRepeatAttributeName setting value
-
getRejectDeprecatedAlg
public boolean getRejectDeprecatedAlg()
- Returns:
- the rejectDeprecatedAlg setting value
-
getSPcert
public final java.security.cert.X509Certificate getSPcert()
- Returns:
- the spX509cert setting value
-
getSPcertNew
public final java.security.cert.X509Certificate getSPcertNew()
- Returns:
- the spX509certNew setting value
-
getSPkey
public final java.security.PrivateKey getSPkey()
- Returns:
- the spPrivateKey setting value
-
getIdpEntityId
public final java.lang.String getIdpEntityId()
- Returns:
- the idpEntityId setting value
-
getIdpSingleSignOnServiceUrl
public final java.net.URL getIdpSingleSignOnServiceUrl()
- Returns:
- the idpSingleSignOnServiceUrl setting value
-
getIdpSingleSignOnServiceBinding
public final java.lang.String getIdpSingleSignOnServiceBinding()
- Returns:
- the idpSingleSignOnServiceBinding setting value
-
getIdpSingleLogoutServiceUrl
public final java.net.URL getIdpSingleLogoutServiceUrl()
- Returns:
- the idpSingleLogoutServiceUrl setting value
-
getIdpSingleLogoutServiceResponseUrl
public final java.net.URL getIdpSingleLogoutServiceResponseUrl()
- Returns:
- the idpSingleLogoutServiceResponseUrl setting value
-
getIdpSingleLogoutServiceBinding
public final java.lang.String getIdpSingleLogoutServiceBinding()
- Returns:
- the idpSingleLogoutServiceBinding setting value
-
getIdpx509cert
public final java.security.cert.X509Certificate getIdpx509cert()
- Returns:
- the idpx509cert setting value
-
getIdpCertFingerprint
public final java.lang.String getIdpCertFingerprint()
- Returns:
- the idpCertFingerprint setting value
-
getIdpCertFingerprintAlgorithm
public final java.lang.String getIdpCertFingerprintAlgorithm()
- Returns:
- the idpCertFingerprintAlgorithm setting value
-
getIdpx509certMulti
public java.util.List<java.security.cert.X509Certificate> getIdpx509certMulti()
- Returns:
- the idpx509certMulti setting value
-
getNameIdEncrypted
public boolean getNameIdEncrypted()
- Returns:
- the nameIdEncrypted setting value
-
getAuthnRequestsSigned
public boolean getAuthnRequestsSigned()
- Returns:
- the authnRequestsSigned setting value
-
getLogoutRequestSigned
public boolean getLogoutRequestSigned()
- Returns:
- the logoutRequestSigned setting value
-
getLogoutResponseSigned
public boolean getLogoutResponseSigned()
- Returns:
- the logoutResponseSigned setting value
-
getWantMessagesSigned
public boolean getWantMessagesSigned()
- Returns:
- the wantMessagesSigned setting value
-
getWantAssertionsSigned
public boolean getWantAssertionsSigned()
- Returns:
- the wantAssertionsSigned setting value
-
getWantAssertionsEncrypted
public boolean getWantAssertionsEncrypted()
- Returns:
- the wantAssertionsEncrypted setting value
-
getWantNameId
public boolean getWantNameId()
- Returns:
- the wantNameId setting value
-
getWantNameIdEncrypted
public boolean getWantNameIdEncrypted()
- Returns:
- the wantNameIdEncrypted setting value
-
getSignMetadata
public boolean getSignMetadata()
- Returns:
- the signMetadata setting value
-
getRequestedAuthnContext
public java.util.List<java.lang.String> getRequestedAuthnContext()
- Returns:
- the requestedAuthnContext setting value
-
getRequestedAuthnContextComparison
public java.lang.String getRequestedAuthnContextComparison()
- Returns:
- the requestedAuthnContextComparison setting value
-
getWantXMLValidation
public boolean getWantXMLValidation()
- Returns:
- the wantXMLValidation setting value
-
getSignatureAlgorithm
public java.lang.String getSignatureAlgorithm()
- Returns:
- the signatureAlgorithm setting value
-
getDigestAlgorithm
public java.lang.String getDigestAlgorithm()
- Returns:
- the digestAlgorithm setting value
-
getContacts
public java.util.List<Contact> getContacts()
- Returns:
- SP Contact info
-
getOrganization
public Organization getOrganization()
- Returns:
- SP Organization info
-
getUniqueIDPrefix
public java.lang.String getUniqueIDPrefix()
- Returns:
- Unique ID prefix
-
getHsm
public HSM getHsm()
- Returns:
- The HSM setting value.
-
isDebugActive
public boolean isDebugActive()
- Returns:
- if the debug is active or not
-
setStrict
public void setStrict(boolean strict)
Set the strict setting value- Parameters:
strict- the strict to be set
-
setDebug
public void setDebug(boolean debug)
Set the debug setting value- Parameters:
debug- the debug mode to be set
-
setHsm
public void setHsm(HSM hsm)
Sets the HSM setting value.- Parameters:
hsm- The HSM object to be set.
-
setSpEntityId
protected final void setSpEntityId(java.lang.String spEntityId)
Set the spEntityId setting value- Parameters:
spEntityId- the spEntityId value to be set
-
setSpAssertionConsumerServiceUrl
protected final void setSpAssertionConsumerServiceUrl(java.net.URL spAssertionConsumerServiceUrl)
Set the spAssertionConsumerServiceUrl setting value- Parameters:
spAssertionConsumerServiceUrl- the spAssertionConsumerServiceUrl value to be set
-
setSpAssertionConsumerServiceBinding
protected final void setSpAssertionConsumerServiceBinding(java.lang.String spAssertionConsumerServiceBinding)
Set the spAssertionConsumerServiceBinding setting value- Parameters:
spAssertionConsumerServiceBinding- the spAssertionConsumerServiceBinding value to be set
-
setSpSingleLogoutServiceUrl
protected final void setSpSingleLogoutServiceUrl(java.net.URL spSingleLogoutServiceUrl)
Set the spSingleLogoutServiceUrl setting value- Parameters:
spSingleLogoutServiceUrl- the spSingleLogoutServiceUrl value to be set
-
setSpSingleLogoutServiceBinding
protected final void setSpSingleLogoutServiceBinding(java.lang.String spSingleLogoutServiceBinding)
Set the spSingleLogoutServiceBinding setting value- Parameters:
spSingleLogoutServiceBinding- the spSingleLogoutServiceBinding value to be set
-
setSpNameIDFormat
protected final void setSpNameIDFormat(java.lang.String spNameIDFormat)
Set the spNameIDFormat setting value- Parameters:
spNameIDFormat- the spNameIDFormat value to be set
-
setAllowRepeatAttributeName
public void setAllowRepeatAttributeName(boolean allowRepeatAttributeName)
Set the allowRepeatAttributeName setting value- Parameters:
allowRepeatAttributeName- the allowRepeatAttributeName value to be set
-
setRejectDeprecatedAlg
public void setRejectDeprecatedAlg(boolean rejectDeprecatedAlg)
Set the rejectDeprecatedAlg setting value- Parameters:
rejectDeprecatedAlg- the rejectDeprecatedAlg value to be set
-
setSpX509cert
protected final void setSpX509cert(java.security.cert.X509Certificate spX509cert)
Set the spX509cert setting value provided as X509Certificate object- Parameters:
spX509cert- the spX509cert value to be set in X509Certificate format
-
setSpX509certNew
protected final void setSpX509certNew(java.security.cert.X509Certificate spX509certNew)
Set the spX509certNew setting value provided as X509Certificate object- Parameters:
spX509certNew- the spX509certNew value to be set in X509Certificate format
-
setSpPrivateKey
protected final void setSpPrivateKey(java.security.PrivateKey spPrivateKey)
Set the spPrivateKey setting value provided as a PrivateKey object- Parameters:
spPrivateKey- the spprivateKey value to be set in PrivateKey format
-
setUniqueIDPrefix
protected final void setUniqueIDPrefix(java.lang.String uniqueIDPrefix)
Set the uniqueIDPrefix setting value- Parameters:
uniqueIDPrefix- the Unique ID prefix used when generating Unique ID
-
setIdpEntityId
protected final void setIdpEntityId(java.lang.String idpEntityId)
Set the idpEntityId setting value- Parameters:
idpEntityId- the idpEntityId value to be set
-
setIdpSingleSignOnServiceUrl
protected final void setIdpSingleSignOnServiceUrl(java.net.URL idpSingleSignOnServiceUrl)
Set the idpSingleSignOnServiceUrl setting value- Parameters:
idpSingleSignOnServiceUrl- the idpSingleSignOnServiceUrl value to be set
-
setIdpSingleSignOnServiceBinding
protected final void setIdpSingleSignOnServiceBinding(java.lang.String idpSingleSignOnServiceBinding)
Set the idpSingleSignOnServiceBinding setting value- Parameters:
idpSingleSignOnServiceBinding- the idpSingleSignOnServiceBinding value to be set
-
setIdpSingleLogoutServiceUrl
protected final void setIdpSingleLogoutServiceUrl(java.net.URL idpSingleLogoutServiceUrl)
Set the idpSingleLogoutServiceUrl setting value- Parameters:
idpSingleLogoutServiceUrl- the idpSingleLogoutServiceUrl value to be set
-
setIdpSingleLogoutServiceResponseUrl
protected final void setIdpSingleLogoutServiceResponseUrl(java.net.URL idpSingleLogoutServiceResponseUrl)
Set the idpSingleLogoutServiceUrl setting value- Parameters:
idpSingleLogoutServiceResponseUrl- the idpSingleLogoutServiceUrl value to be set
-
setIdpSingleLogoutServiceBinding
protected final void setIdpSingleLogoutServiceBinding(java.lang.String idpSingleLogoutServiceBinding)
Set the idpSingleLogoutServiceBinding setting value- Parameters:
idpSingleLogoutServiceBinding- the idpSingleLogoutServiceBinding value to be set
-
setIdpx509cert
protected final void setIdpx509cert(java.security.cert.X509Certificate idpX509cert)
Set the idpX509cert setting value provided as a X509Certificate object- Parameters:
idpX509cert- the idpX509cert value to be set in X509Certificate format
-
setIdpCertFingerprint
protected final void setIdpCertFingerprint(java.lang.String idpCertFingerprint)
Set the idpCertFingerprint setting value- Parameters:
idpCertFingerprint- the idpCertFingerprint value to be set
-
setIdpCertFingerprintAlgorithm
protected final void setIdpCertFingerprintAlgorithm(java.lang.String idpCertFingerprintAlgorithm)
Set the idpCertFingerprintAlgorithm setting value- Parameters:
idpCertFingerprintAlgorithm- the idpCertFingerprintAlgorithm value to be set.
-
setIdpx509certMulti
public void setIdpx509certMulti(java.util.List<java.security.cert.X509Certificate> idpx509certMulti)
Set the idpx509certMulti setting value- Parameters:
idpx509certMulti- the idpx509certMulti to set
-
setNameIdEncrypted
public void setNameIdEncrypted(boolean nameIdEncrypted)
Set the nameIdEncrypted setting value- Parameters:
nameIdEncrypted- the nameIdEncrypted value to be set. Based on it the SP will encrypt the NameID or not
-
setAuthnRequestsSigned
public void setAuthnRequestsSigned(boolean authnRequestsSigned)
Set the authnRequestsSigned setting value- Parameters:
authnRequestsSigned- the authnRequestsSigned value to be set. Based on it the SP will sign Logout Request or not
-
setLogoutRequestSigned
public void setLogoutRequestSigned(boolean logoutRequestSigned)
Set the logoutRequestSigned setting value- Parameters:
logoutRequestSigned- the logoutRequestSigned value to be set. Based on it the SP will sign Logout Request or not
-
setLogoutResponseSigned
public void setLogoutResponseSigned(boolean logoutResponseSigned)
Set the logoutResponseSigned setting value- Parameters:
logoutResponseSigned- the logoutResponseSigned value to be set. Based on it the SP will sign Logout Response or not
-
setWantMessagesSigned
public void setWantMessagesSigned(boolean wantMessagesSigned)
Set the wantMessagesSigned setting value- Parameters:
wantMessagesSigned- the wantMessagesSigned value to be set. Based on it the SP expects the SAML Messages to be signed or not
-
setWantAssertionsSigned
public void setWantAssertionsSigned(boolean wantAssertionsSigned)
Set the wantAssertionsSigned setting value- Parameters:
wantAssertionsSigned- the wantAssertionsSigned value to be set. Based on it the SP expects the SAML Assertions to be signed or not
-
setWantAssertionsEncrypted
public void setWantAssertionsEncrypted(boolean wantAssertionsEncrypted)
Set the wantAssertionsEncrypted setting value- Parameters:
wantAssertionsEncrypted- the wantAssertionsEncrypted value to be set. Based on it the SP expects the SAML Assertions to be encrypted or not
-
setWantNameId
public void setWantNameId(boolean wantNameId)
Set the wantNameId setting value- Parameters:
wantNameId- the wantNameId value to be set. Based on it the SP expects a NameID
-
setWantNameIdEncrypted
public void setWantNameIdEncrypted(boolean wantNameIdEncrypted)
Set the wantNameIdEncrypted setting value- Parameters:
wantNameIdEncrypted- the wantNameIdEncrypted value to be set. Based on it the SP expects the NameID to be encrypted or not
-
setSignMetadata
public void setSignMetadata(boolean signMetadata)
Set the signMetadata setting value- Parameters:
signMetadata- the signMetadata value to be set. Based on it the SP will sign or not the metadata with the SP PrivateKey/Certificate
-
setRequestedAuthnContext
public void setRequestedAuthnContext(java.util.List<java.lang.String> requestedAuthnContext)
Set the requestedAuthnContext setting value- Parameters:
requestedAuthnContext- the requestedAuthnContext value to be set on the AuthNRequest.
-
setRequestedAuthnContextComparison
public void setRequestedAuthnContextComparison(java.lang.String requestedAuthnContextComparison)
Set the requestedAuthnContextComparison setting value- Parameters:
requestedAuthnContextComparison- the requestedAuthnContextComparison value to be set.
-
setWantXMLValidation
public void setWantXMLValidation(boolean wantXMLValidation)
Set the wantXMLValidation setting value- Parameters:
wantXMLValidation- the wantXMLValidation value to be set. Based on it the SP will validate SAML messages against the XML scheme
-
setSignatureAlgorithm
public void setSignatureAlgorithm(java.lang.String signatureAlgorithm)
Set the signatureAlgorithm setting value- Parameters:
signatureAlgorithm- the signatureAlgorithm value to be set.
-
setDigestAlgorithm
public void setDigestAlgorithm(java.lang.String digestAlgorithm)
Set the digestAlgorithm setting value- Parameters:
digestAlgorithm- the digestAlgorithm value to be set.
-
setRejectUnsolicitedResponsesWithInResponseTo
public void setRejectUnsolicitedResponsesWithInResponseTo(boolean rejectUnsolicitedResponsesWithInResponseTo)
Controls if unsolicited Responses are rejected if they contain an InResponseTo value. If false using a validate methodSamlResponse.isValid(String)with a null argument will accept messages with any (or none) InResponseTo value. If true using these methods with a null argument will only accept messages with no InRespoonseTo value, and reject messages where the value is set. In all cases using validate with a specified request ID will only accept responses that have the same InResponseTo id set.- Parameters:
rejectUnsolicitedResponsesWithInResponseTo- whether to strictly check the InResponseTo attribute
-
isRejectUnsolicitedResponsesWithInResponseTo
public boolean isRejectUnsolicitedResponsesWithInResponseTo()
-
setCompressRequest
public void setCompressRequest(boolean compressRequest)
Set the compressRequest setting value- Parameters:
compressRequest- the compressRequest value to be set.
-
isCompressRequestEnabled
public boolean isCompressRequestEnabled()
- Returns:
- the compressRequest setting value
-
setCompressResponse
public void setCompressResponse(boolean compressResponse)
Set the compressResponse setting value- Parameters:
compressResponse- the compressResponse value to be set.
-
isCompressResponseEnabled
public boolean isCompressResponseEnabled()
- Returns:
- the compressResponse setting value
-
setTrimNameIds
public void setTrimNameIds(boolean trimNameIds)
Sets whether Name IDs in parsed SAML messages should be trimmed.Default is
false, that is Name IDs are kept intact, as the SAML specification prescribes.- Parameters:
trimNameIds- set totrueto trim parsed Name IDs, set tofalseto keep them intact
-
isTrimNameIds
public boolean isTrimNameIds()
Determines whether Name IDs should trimmed when extracting them from parsed SAML messages.Default is
false, that is Name IDs are kept intact, as the SAML specification prescribes.- Returns:
trueif Name IDs should be trimmed,falseotherwise
-
setTrimAttributeValues
public void setTrimAttributeValues(boolean trimAttributeValues)
Sets whether attribute values in parsed SAML messages should be trimmed.Default is
false.- Parameters:
trimAttributeValues- set totrueto trim parsed attribute values, set tofalseto keep them intact
-
isTrimAttributeValues
public boolean isTrimAttributeValues()
Determines whether attribute values should be trimmed when extracting them from parsed SAML messages.Default is
false.- Returns:
trueif attribute values should be trimmed,falseotherwise
-
setContacts
protected final void setContacts(java.util.List<Contact> contacts)
Set contacts info that will be listed on the Service Provider metadata- Parameters:
contacts- the contacts to set
-
setOrganization
protected final void setOrganization(Organization organization)
Set the organization info that will be published on the Service Provider metadata- Parameters:
organization- the organization to set
-
checkSettings
public java.util.List<java.lang.String> checkSettings()
Checks the settings .- Returns:
- errors found on the settings data
-
checkIdPSettings
public java.util.List<java.lang.String> checkIdPSettings()
Checks the IdP settings .- Returns:
- errors found on the IdP settings data
-
checkIdpx509certRequired
private boolean checkIdpx509certRequired()
Auxiliary method to check Idp certificate is configured.- Returns:
- true if the Idp Certificate settings are valid
-
checkSPSettings
public java.util.List<java.lang.String> checkSPSettings()
Checks the SP settings .- Returns:
- errors found on the SP settings data
-
checkSPCerts
public boolean checkSPCerts()
Checks the x509 certficate/private key SP settings .- Returns:
- true if the SP settings are valid
-
checkRequired
private boolean checkRequired(java.lang.Object value)
Auxiliary method to check required properties.- Parameters:
value- the current value of the property to be checked- Returns:
- true if the SP settings are valid
-
setSPValidationOnly
public void setSPValidationOnly(boolean spValidationOnly)
Set the spValidationOnly value, used to check IdP data on checkSettings method- Parameters:
spValidationOnly- the spValidationOnly value to be set
-
getSPValidationOnly
public boolean getSPValidationOnly()
- Returns:
- the spValidationOnly value
-
getSPMetadata
public java.lang.String getSPMetadata() throws java.security.cert.CertificateEncodingExceptionGets the SP metadata. The XML representation.- Returns:
- the SP metadata (xml)
- Throws:
java.security.cert.CertificateEncodingException
-
validateMetadata
public static java.util.List<java.lang.String> validateMetadata(java.lang.String metadataString) throws java.lang.ExceptionValidates an XML SP Metadata.- Parameters:
metadataString- Metadata's XML that will be validate- Returns:
- Array The list of found errors
- Throws:
java.lang.Exception
-
-