public class Saml2Settings extends Object
| Constructor and Description |
|---|
Saml2Settings() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
checkIdPSettings()
Checks the IdP settings .
|
List<String> |
checkSettings()
Checks the settings .
|
boolean |
checkSPCerts()
Checks the x509 certficate/private key SP settings .
|
List<String> |
checkSPSettings()
Checks the SP settings .
|
boolean |
getAuthnRequestsSigned() |
List<Contact> |
getContacts() |
String |
getDigestAlgorithm() |
String |
getIdpCertFingerprint() |
String |
getIdpCertFingerprintAlgorithm() |
String |
getIdpEntityId() |
String |
getIdpSingleLogoutServiceBinding() |
URL |
getIdpSingleLogoutServiceResponseUrl() |
URL |
getIdpSingleLogoutServiceUrl() |
String |
getIdpSingleSignOnServiceBinding() |
URL |
getIdpSingleSignOnServiceUrl() |
X509Certificate |
getIdpx509cert() |
List<X509Certificate> |
getIdpx509certMulti() |
boolean |
getLogoutRequestSigned() |
boolean |
getLogoutResponseSigned() |
boolean |
getNameIdEncrypted() |
Organization |
getOrganization() |
List<String> |
getRequestedAuthnContext() |
String |
getRequestedAuthnContextComparison() |
String |
getSignatureAlgorithm() |
boolean |
getSignMetadata() |
String |
getSpAssertionConsumerServiceBinding() |
URL |
getSpAssertionConsumerServiceUrl() |
X509Certificate |
getSPcert() |
String |
getSpEntityId() |
PrivateKey |
getSPkey() |
String |
getSPMetadata()
Gets the SP metadata.
|
String |
getSpNameIDFormat() |
String |
getSpSingleLogoutServiceBinding() |
URL |
getSpSingleLogoutServiceUrl() |
boolean |
getSPValidationOnly() |
String |
getUniqueIDPrefix() |
boolean |
getWantAssertionsEncrypted() |
boolean |
getWantAssertionsSigned() |
boolean |
getWantMessagesSigned() |
boolean |
getWantNameId() |
boolean |
getWantNameIdEncrypted() |
boolean |
getWantXMLValidation() |
boolean |
isCompressRequestEnabled() |
boolean |
isCompressResponseEnabled() |
boolean |
isDebugActive() |
boolean |
isRejectUnsolicitedResponsesWithInResponseTo() |
boolean |
isStrict() |
void |
setAuthnRequestsSigned(boolean authnRequestsSigned)
Set the authnRequestsSigned setting value
|
void |
setCompressRequest(boolean compressRequest)
Set the compressRequest setting value
|
void |
setCompressResponse(boolean compressResponse)
Set the compressResponse setting value
|
protected void |
setContacts(List<Contact> contacts)
Set contacts info that will be listed on the Service Provider metadata
|
void |
setDebug(boolean debug)
Set the debug setting value
|
void |
setDigestAlgorithm(String digestAlgorithm)
Set the digestAlgorithm setting value
|
protected void |
setIdpCertFingerprint(String idpCertFingerprint)
Set the idpCertFingerprint setting value
|
protected void |
setIdpCertFingerprintAlgorithm(String idpCertFingerprintAlgorithm)
Set the idpCertFingerprintAlgorithm setting value
|
protected void |
setIdpEntityId(String idpEntityId)
Set the idpEntityId setting value
|
protected void |
setIdpSingleLogoutServiceBinding(String idpSingleLogoutServiceBinding)
Set the idpSingleLogoutServiceBinding setting value
|
protected void |
setIdpSingleLogoutServiceResponseUrl(URL idpSingleLogoutServiceResponseUrl)
Set the idpSingleLogoutServiceUrl setting value
|
protected void |
setIdpSingleLogoutServiceUrl(URL idpSingleLogoutServiceUrl)
Set the idpSingleLogoutServiceUrl setting value
|
protected void |
setIdpSingleSignOnServiceBinding(String idpSingleSignOnServiceBinding)
Set the idpSingleSignOnServiceBinding setting value
|
protected void |
setIdpSingleSignOnServiceUrl(URL idpSingleSignOnServiceUrl)
Set the idpSingleSignOnServiceUrl setting value
|
protected void |
setIdpx509cert(X509Certificate idpX509cert)
Set the idpX509cert setting value provided as a X509Certificate object
|
void |
setIdpx509certMulti(List<X509Certificate> idpx509certMulti)
Set the idpx509certMulti setting value
|
void |
setLogoutRequestSigned(boolean logoutRequestSigned)
Set the logoutRequestSigned setting value
|
void |
setLogoutResponseSigned(boolean logoutResponseSigned)
Set the logoutResponseSigned setting value
|
void |
setNameIdEncrypted(boolean nameIdEncrypted)
Set the nameIdEncrypted setting value
|
protected void |
setOrganization(Organization organization)
Set the organization info that will be published on the Service Provider metadata
|
void |
setRejectUnsolicitedResponsesWithInResponseTo(boolean rejectUnsolicitedResponsesWithInResponseTo)
Controls if unsolicited Responses are rejected if they contain an InResponseTo value.
|
void |
setRequestedAuthnContext(List<String> requestedAuthnContext)
Set the requestedAuthnContext setting value
|
void |
setRequestedAuthnContextComparison(String requestedAuthnContextComparison)
Set the requestedAuthnContextComparison setting value
|
void |
setSignatureAlgorithm(String signatureAlgorithm)
Set the signatureAlgorithm setting value
|
void |
setSignMetadata(boolean signMetadata)
Set the signMetadata setting value
|
protected void |
setSpAssertionConsumerServiceBinding(String spAssertionConsumerServiceBinding)
Set the spAssertionConsumerServiceBinding setting value
|
protected void |
setSpAssertionConsumerServiceUrl(URL spAssertionConsumerServiceUrl)
Set the spAssertionConsumerServiceUrl setting value
|
protected void |
setSpEntityId(String spEntityId)
Set the spEntityId setting value
|
protected void |
setSpNameIDFormat(String spNameIDFormat)
Set the spNameIDFormat setting value
|
protected void |
setSpPrivateKey(PrivateKey spPrivateKey)
Set the spPrivateKey setting value provided as a PrivateKey object
|
protected void |
setSpSingleLogoutServiceBinding(String spSingleLogoutServiceBinding)
Set the spSingleLogoutServiceBinding setting value
|
protected void |
setSpSingleLogoutServiceUrl(URL spSingleLogoutServiceUrl)
Set the spSingleLogoutServiceUrl setting value
|
void |
setSPValidationOnly(boolean spValidationOnly)
Set the spValidationOnly value, used to check IdP data on checkSettings method
|
protected void |
setSpX509cert(X509Certificate spX509cert)
Set the spX509cert setting value provided as X509Certificate object
|
void |
setStrict(boolean strict)
Set the strict setting value
|
protected void |
setUniqueIDPrefix(String uniqueIDPrefix)
Set the uniqueIDPrefix setting value
|
void |
setWantAssertionsEncrypted(boolean wantAssertionsEncrypted)
Set the wantAssertionsEncrypted setting value
|
void |
setWantAssertionsSigned(boolean wantAssertionsSigned)
Set the wantAssertionsSigned setting value
|
void |
setWantMessagesSigned(boolean wantMessagesSigned)
Set the wantMessagesSigned setting value
|
void |
setWantNameId(boolean wantNameId)
Set the wantNameId setting value
|
void |
setWantNameIdEncrypted(boolean wantNameIdEncrypted)
Set the wantNameIdEncrypted setting value
|
void |
setWantXMLValidation(boolean wantXMLValidation)
Set the wantXMLValidation setting value
|
static List<String> |
validateMetadata(String metadataString)
Validates an XML SP Metadata.
|
public final boolean isStrict()
public final String getSpEntityId()
public final URL getSpAssertionConsumerServiceUrl()
public final String getSpAssertionConsumerServiceBinding()
public final URL getSpSingleLogoutServiceUrl()
public final String getSpSingleLogoutServiceBinding()
public final String getSpNameIDFormat()
public final X509Certificate getSPcert()
public final PrivateKey getSPkey()
public final String getIdpEntityId()
public final URL getIdpSingleSignOnServiceUrl()
public final String getIdpSingleSignOnServiceBinding()
public final URL getIdpSingleLogoutServiceUrl()
public final URL getIdpSingleLogoutServiceResponseUrl()
public final String getIdpSingleLogoutServiceBinding()
public final X509Certificate getIdpx509cert()
public final String getIdpCertFingerprint()
public final String getIdpCertFingerprintAlgorithm()
public List<X509Certificate> getIdpx509certMulti()
public boolean getNameIdEncrypted()
public boolean getAuthnRequestsSigned()
public boolean getLogoutRequestSigned()
public boolean getLogoutResponseSigned()
public boolean getWantMessagesSigned()
public boolean getWantAssertionsSigned()
public boolean getWantAssertionsEncrypted()
public boolean getWantNameId()
public boolean getWantNameIdEncrypted()
public boolean getSignMetadata()
public List<String> getRequestedAuthnContext()
public String getRequestedAuthnContextComparison()
public boolean getWantXMLValidation()
public String getSignatureAlgorithm()
public String getDigestAlgorithm()
public Organization getOrganization()
public String getUniqueIDPrefix()
public boolean isDebugActive()
public void setStrict(boolean strict)
strict - the strict to be setpublic void setDebug(boolean debug)
debug - the debug mode to be setprotected final void setSpEntityId(String spEntityId)
spEntityId - the spEntityId value to be setprotected final void setSpAssertionConsumerServiceUrl(URL spAssertionConsumerServiceUrl)
spAssertionConsumerServiceUrl - the spAssertionConsumerServiceUrl value to be setprotected final void setSpAssertionConsumerServiceBinding(String spAssertionConsumerServiceBinding)
spAssertionConsumerServiceBinding - the spAssertionConsumerServiceBinding value to be setprotected final void setSpSingleLogoutServiceUrl(URL spSingleLogoutServiceUrl)
spSingleLogoutServiceUrl - the spSingleLogoutServiceUrl value to be setprotected final void setSpSingleLogoutServiceBinding(String spSingleLogoutServiceBinding)
spSingleLogoutServiceBinding - the spSingleLogoutServiceBinding value to be setprotected final void setSpNameIDFormat(String spNameIDFormat)
spNameIDFormat - the spNameIDFormat value to be setprotected final void setSpX509cert(X509Certificate spX509cert)
spX509cert - the spX509cert value to be set in X509Certificate formatprotected final void setSpPrivateKey(PrivateKey spPrivateKey)
spPrivateKey - the spprivateKey value to be set in PrivateKey formatprotected final void setUniqueIDPrefix(String uniqueIDPrefix)
uniqueIDPrefix - the Unique ID prefix used when generating Unique IDprotected final void setIdpEntityId(String idpEntityId)
idpEntityId - the idpEntityId value to be setprotected final void setIdpSingleSignOnServiceUrl(URL idpSingleSignOnServiceUrl)
idpSingleSignOnServiceUrl - the idpSingleSignOnServiceUrl value to be setprotected final void setIdpSingleSignOnServiceBinding(String idpSingleSignOnServiceBinding)
idpSingleSignOnServiceBinding - the idpSingleSignOnServiceBinding value to be setprotected final void setIdpSingleLogoutServiceUrl(URL idpSingleLogoutServiceUrl)
idpSingleLogoutServiceUrl - the idpSingleLogoutServiceUrl value to be setprotected final void setIdpSingleLogoutServiceResponseUrl(URL idpSingleLogoutServiceResponseUrl)
idpSingleLogoutServiceResponseUrl - the idpSingleLogoutServiceUrl value to be setprotected final void setIdpSingleLogoutServiceBinding(String idpSingleLogoutServiceBinding)
idpSingleLogoutServiceBinding - the idpSingleLogoutServiceBinding value to be setprotected final void setIdpx509cert(X509Certificate idpX509cert)
idpX509cert - the idpX509cert value to be set in X509Certificate formatprotected final void setIdpCertFingerprint(String idpCertFingerprint)
idpCertFingerprint - the idpCertFingerprint value to be setprotected final void setIdpCertFingerprintAlgorithm(String idpCertFingerprintAlgorithm)
idpCertFingerprintAlgorithm - the idpCertFingerprintAlgorithm value to be set.public void setIdpx509certMulti(List<X509Certificate> idpx509certMulti)
idpx509certMulti - the idpx509certMulti to setpublic void setNameIdEncrypted(boolean nameIdEncrypted)
nameIdEncrypted - the nameIdEncrypted value to be set. Based on it the SP will encrypt the NameID or notpublic void setAuthnRequestsSigned(boolean authnRequestsSigned)
authnRequestsSigned - the authnRequestsSigned value to be set. Based on it the SP will sign Logout Request or notpublic void setLogoutRequestSigned(boolean logoutRequestSigned)
logoutRequestSigned - the logoutRequestSigned value to be set. Based on it the SP will sign Logout Request or notpublic void setLogoutResponseSigned(boolean logoutResponseSigned)
logoutResponseSigned - the logoutResponseSigned value to be set. Based on it the SP will sign Logout Response or notpublic void setWantMessagesSigned(boolean wantMessagesSigned)
wantMessagesSigned - the wantMessagesSigned value to be set. Based on it the SP expects the SAML Messages to be signed or notpublic void setWantAssertionsSigned(boolean wantAssertionsSigned)
wantAssertionsSigned - the wantAssertionsSigned value to be set. Based on it the SP expects the SAML Assertions to be signed or notpublic void setWantAssertionsEncrypted(boolean wantAssertionsEncrypted)
wantAssertionsEncrypted - the wantAssertionsEncrypted value to be set. Based on it the SP expects the SAML Assertions to be encrypted or notpublic void setWantNameId(boolean wantNameId)
wantNameId - the wantNameId value to be set. Based on it the SP expects a NameIDpublic void setWantNameIdEncrypted(boolean wantNameIdEncrypted)
wantNameIdEncrypted - the wantNameIdEncrypted value to be set. Based on it the SP expects the NameID to be encrypted or notpublic void setSignMetadata(boolean signMetadata)
signMetadata - the signMetadata value to be set. Based on it the SP will sign or not the metadata with the SP PrivateKey/Certificatepublic void setRequestedAuthnContext(List<String> requestedAuthnContext)
requestedAuthnContext - the requestedAuthnContext value to be set on the AuthNRequest.public void setRequestedAuthnContextComparison(String requestedAuthnContextComparison)
requestedAuthnContextComparison - the requestedAuthnContextComparison value to be set.public void setWantXMLValidation(boolean wantXMLValidation)
wantXMLValidation - the wantXMLValidation value to be set. Based on it the SP will validate SAML messages against the XML schemepublic void setSignatureAlgorithm(String signatureAlgorithm)
signatureAlgorithm - the signatureAlgorithm value to be set.public void setDigestAlgorithm(String digestAlgorithm)
digestAlgorithm - the digestAlgorithm value to be set.public void setRejectUnsolicitedResponsesWithInResponseTo(boolean rejectUnsolicitedResponsesWithInResponseTo)
SamlResponse.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.rejectUnsolicitedResponsesWithInResponseTo - whether to strictly check the InResponseTo attributepublic boolean isRejectUnsolicitedResponsesWithInResponseTo()
public void setCompressRequest(boolean compressRequest)
compressRequest - the compressRequest value to be set.public boolean isCompressRequestEnabled()
public void setCompressResponse(boolean compressResponse)
compressResponse - the compressResponse value to be set.public boolean isCompressResponseEnabled()
protected final void setContacts(List<Contact> contacts)
contacts - the contacts to setprotected final void setOrganization(Organization organization)
organization - the organization to setpublic List<String> checkSettings()
public List<String> checkIdPSettings()
public List<String> checkSPSettings()
public boolean checkSPCerts()
public void setSPValidationOnly(boolean spValidationOnly)
spValidationOnly - the spValidationOnly value to be setpublic boolean getSPValidationOnly()
public String getSPMetadata() throws CertificateEncodingException
CertificateEncodingExceptionCopyright © 2018. All rights reserved.