Class LDAPServerDetails

java.lang.Object
com.nimbusds.common.config.LDAPServerDetails
All Implemented Interfaces:
LoggableConfiguration
Direct Known Subclasses:
LDAPServerConnectionPoolDetails

public class LDAPServerDetails extends Object implements LoggableConfiguration
LDAP server connect details.

The configuration is stored as public fields which become immutable (final) after their initialisation.

Property keys: [prefix]*

  • Field Details

    • url

      public final com.unboundid.ldap.sdk.LDAPURL[] url
      Specifies an array of one or more LDAP server URLs. If not null 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 by url, 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

      public final int 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

      public static final int DEFAULT_CONNECT_TIMEOUT
      The default timeout in milliseconds for LDAP connect requests.
      See Also:
    • responseTimeout

      public final int 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

      public static final int DEFAULT_RESPONSE_TIMEOUT
      The default timeout in milliseconds for LDAP server responses.
      See Also:
    • trustSelfSignedCerts

      public final boolean 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

      public static final boolean 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 be null.
      security - The LDAP connection security. Must not be null.
      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 be null.
      selectionAlgorithm - The preferred algorithm for selecting an LDAP server from the URL array. May be null if only a single LDAP server URL is defined.
      security - The LDAP connection security. Must not be null.
      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 be null.
      props - The properties. Must not be null.
      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 be null.
      props - The properties. Must not be null.
      Throws:
      com.thetransactioncompany.util.PropertyParseException - On a missing or invalid property.
  • Method Details