Package com.nimbusds.common.config
Class LDAPServerDetails
java.lang.Object
com.nimbusds.common.config.LDAPServerDetails
- All Implemented Interfaces:
LoggableConfiguration
- Direct Known Subclasses:
LDAPServerConnectionPoolDetails
LDAP server connect details.
The configuration is stored as public fields which become immutable (final) after their initialisation.
Property keys: [prefix]*
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
The timeout in milliseconds for LDAP connect requests.static final int
The default timeout in milliseconds for LDAP connect requests.static final int
The default timeout in milliseconds for LDAP server responses.static final LDAPConnectionSecurity
The default LDAP connection security.static final ServerSelectionAlgorithm
The default server selection algorithm.static final boolean
The default trust for self-signed certificates.final int
The timeout in milliseconds for LDAP server responses.final LDAPConnectionSecurity
The LDAP connection security.final ServerSelectionAlgorithm
The preferred algorithm for selecting an LDAP server from the array specified byurl
,null
if only a single server URL is defined.final boolean
Determines whether to accept self-signed certificates presented by the LDAP server (for secure SSL or StartTLS connections).final com.unboundid.ldap.sdk.LDAPURL[]
Specifies an array of one or more LDAP server URLs.Fields inherited from interface com.nimbusds.common.config.LoggableConfiguration
LOG_CATEGORY
-
Constructor Summary
ConstructorDescriptionLDAPServerDetails
(com.unboundid.ldap.sdk.LDAPURL[] url, ServerSelectionAlgorithm selectionAlgorithm, LDAPConnectionSecurity security, int connectTimeout, int responseTimeout, boolean trustSelfSignedCerts) Creates a new LDAP server details instance.LDAPServerDetails
(com.unboundid.ldap.sdk.LDAPURL url, LDAPConnectionSecurity security, int connectTimeout, int responseTimeout, boolean trustSelfSignedCerts) Creates a new LDAP server details instance.LDAPServerDetails
(String prefix, Properties props) Creates a new LDAP server details instance from the specified properties.LDAPServerDetails
(String prefix, Properties props, boolean requireURL) Creates a new LDAP server details instance from the specified properties. -
Method Summary
-
Field Details
-
url
Specifies an array of one or more LDAP server URLs. If notnull
the array is guaranteed to contain at least one LDAP URL.Property key: [prefix]url
-
selectionAlgorithm
The preferred algorithm for selecting an LDAP server from the array specified byurl
,null
if only a single server URL is defined.Property key: [prefix]selectionAlgorithm
-
DEFAULT_SELECTION_ALGORITHM
The default server selection algorithm. -
security
The LDAP connection security.Property key: [prefix]security
-
DEFAULT_SECURITY
The default LDAP connection security. -
connectTimeout
The timeout in milliseconds for LDAP connect requests. If zero the underlying LDAP client library will determine this value.Property key: [prefix]connectTimeout
-
DEFAULT_CONNECT_TIMEOUT
The default timeout in milliseconds for LDAP connect requests.- See Also:
-
responseTimeout
The timeout in milliseconds for LDAP server responses. If zero the underlying LDAP client library will determine this value.Property key: [prefix]responseTimeout
-
DEFAULT_RESPONSE_TIMEOUT
The default timeout in milliseconds for LDAP server responses.- See Also:
-
trustSelfSignedCerts
Determines whether to accept self-signed certificates presented by the LDAP server (for secure SSL or StartTLS connections).Property key: [prefix]trustSelfSignedCerts
-
DEFAULT_SELF_SIGNED_CERTS_TRUST
The default trust for self-signed certificates.- See Also:
-
-
Constructor Details
-
LDAPServerDetails
public LDAPServerDetails(com.unboundid.ldap.sdk.LDAPURL url, LDAPConnectionSecurity security, int connectTimeout, int responseTimeout, boolean trustSelfSignedCerts) Creates a new LDAP server details instance.- Parameters:
url
- The LDAP server URL. Must not benull
.security
- The LDAP connection security. Must not benull
.connectTimeout
- The LDAP server connect timeout, in milliseconds. If zero the underlying LDAP client library will determine this value.responseTimeout
- The LDAP server response timeout, in milliseconds. If zero the underlying LDAP client library will determine this value.trustSelfSignedCerts
- Determines whether to accept self-signed certificates presented by the LDAP server (for secure SSL or StartTLS connections).
-
LDAPServerDetails
public LDAPServerDetails(com.unboundid.ldap.sdk.LDAPURL[] url, ServerSelectionAlgorithm selectionAlgorithm, LDAPConnectionSecurity security, int connectTimeout, int responseTimeout, boolean trustSelfSignedCerts) Creates a new LDAP server details instance.- Parameters:
url
- An array of one or more LDAP server URLs. It must contain at least one LDAP URL and not benull
.selectionAlgorithm
- The preferred algorithm for selecting an LDAP server from the URL array. May benull
if only a single LDAP server URL is defined.security
- The LDAP connection security. Must not benull
.connectTimeout
- The LDAP server connect timeout, in milliseconds. If zero the underlying LDAP client library will determine this value.responseTimeout
- The LDAP server response timeout, in milliseconds. If zero the underlying LDAP client library will determine this value.trustSelfSignedCerts
- Determines whether to accept self-signed certificates presented by the LDAP server (for secure SSL or StartTLS connections).
-
LDAPServerDetails
public LDAPServerDetails(String prefix, Properties props) throws com.thetransactioncompany.util.PropertyParseException Creates a new LDAP server details instance from the specified properties.Mandatory properties:
- [prefix]url
Conditionally mandatory properties:
- [prefix]selectionAlgorithm - if more than one LDAP server URL is specified.
Optional properties, with defaults:
- [prefix]security = STARTTLS
- [prefix]connectTimeout = 0
- [prefix]responseTimeout = 0
- [prefix]trustSelfSignedCerts = false
- Parameters:
prefix
- The properties prefix. Must not benull
.props
- The properties. Must not benull
.- Throws:
com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.
-
LDAPServerDetails
public LDAPServerDetails(String prefix, Properties props, boolean requireURL) throws com.thetransactioncompany.util.PropertyParseException Creates a new LDAP server details instance from the specified properties.Mandatory properties:
- none
Conditionally mandatory properties:
- [prefix]url
- [prefix]selectionAlgorithm - if more than one LDAP server URL is specified.
Optional properties, with defaults:
- [prefix]security = STARTTLS
- [prefix]connectTimeout = 0
- [prefix]responseTimeout = 0
- [prefix]trustSelfSignedCerts = false
- Parameters:
prefix
- The properties prefix. Must not benull
.props
- The properties. Must not benull
.- Throws:
com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.
-
-
Method Details
-
log
Logs the configuration details at INFO level.- Specified by:
log
in interfaceLoggableConfiguration
-