public class LdapConnectionConfig extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LDAP_HOST
The default host : localhost
|
static int |
DEFAULT_LDAP_PORT
Default ports for LDAP
|
static int |
DEFAULT_LDAPS_PORT
Default port for LDAPS
|
static String |
DEFAULT_SSL_PROTOCOL
the default protocol used for creating SSL context
|
static long |
DEFAULT_TIMEOUT
The default timeout for operation : 30 seconds
|
static int |
LDAP_V3
The LDAP version
|
Constructor and Description |
---|
LdapConnectionConfig()
Creates a default LdapConnectionConfig instance
|
Modifier and Type | Method and Description |
---|---|
BinaryAttributeDetector |
getBinaryAttributeDetector() |
String |
getCredentials()
Gets the credentials.
|
String |
getDefaultLdapHost()
Gets the default LDAP host.
|
int |
getDefaultLdapPort()
Gets the default LDAP port.
|
int |
getDefaultLdapsPort()
Gets the default LDAPS port.
|
long |
getDefaultTimeout()
Gets the default timeout in milliseconds.
|
String[] |
getEnabledCipherSuites()
Gets the cipher suites which are enabled.
|
String[] |
getEnabledProtocols()
Gets the protocols which are enabled.
|
KeyManager[] |
getKeyManagers()
Gets the key managers.
|
LdapApiService |
getLdapApiService() |
String |
getLdapHost()
Gets the LDAP host.
|
int |
getLdapPort()
Gets the LDAP port.
|
String |
getName()
Gets the name that is used to authenticate the user.
|
SecureRandom |
getSecureRandom()
Gets the secure random.
|
String |
getSslProtocol()
Gets the SSL protocol.
|
int |
getSupportedLdapVersion()
Gets the supported LDAP version.
|
long |
getTimeout()
Gets the timeout in milliseconds.
|
TrustManager[] |
getTrustManagers()
Gets the trust managers.
|
boolean |
isUseSsl()
Checks if SSL (ldaps://) is used.
|
boolean |
isUseTls()
Checks if TLS is used.
|
void |
setBinaryAttributeDetector(BinaryAttributeDetector binaryAttributeDetector) |
void |
setCredentials(String credentials)
Sets the credentials.
|
void |
setEnabledCipherSuites(String[] enabledCipherSuites)
Sets the cipher suites which are enabled
|
void |
setEnabledProtocols(String... enabledProtocols)
Sets the protocols which are enabled
|
void |
setKeyManagers(KeyManager[] keyManagers)
Sets the key managers.
|
void |
setLdapApiService(LdapApiService ldapApiService) |
void |
setLdapHost(String ldapHost)
Sets the LDAP host.
|
void |
setLdapPort(int ldapPort)
Sets the LDAP port.
|
void |
setName(String name)
Sets the name which is used to authenticate the user.
|
void |
setSecureRandom(SecureRandom secureRandom)
Sets the secure random.
|
void |
setSslProtocol(String sslProtocol)
Sets the SSL protocol.
|
void |
setTimeout(long timeout)
Sets the timeout in milliseconds.
|
void |
setTrustManagers(TrustManager... trustManagers)
Sets the trust managers.
|
void |
setUseSsl(boolean useSsl)
Sets whether SSL should be used.
|
void |
setUseTls(boolean useTls)
Sets whether TLS should be used.
|
public static final int DEFAULT_LDAP_PORT
public static final int DEFAULT_LDAPS_PORT
public static final String DEFAULT_LDAP_HOST
public static final int LDAP_V3
public static final long DEFAULT_TIMEOUT
public static final String DEFAULT_SSL_PROTOCOL
public LdapConnectionConfig()
public boolean isUseSsl()
public void setUseSsl(boolean useSsl)
useSsl
- true to use SSLpublic int getLdapPort()
public void setLdapPort(int ldapPort)
ldapPort
- the new LDAP portpublic String getLdapHost()
public void setLdapHost(String ldapHost)
ldapHost
- the new LDAP hostpublic String getName()
public void setName(String name)
name
- the new namepublic String getCredentials()
public void setCredentials(String credentials)
credentials
- the new credentialspublic int getDefaultLdapPort()
public int getDefaultLdapsPort()
public String getDefaultLdapHost()
public long getDefaultTimeout()
public long getTimeout()
public void setTimeout(long timeout)
timeout
- the timeout in milliseconds to setpublic int getSupportedLdapVersion()
public TrustManager[] getTrustManagers()
public void setTrustManagers(TrustManager... trustManagers)
trustManagers
- the new trust managersIllegalArgumentException
- if the trustManagers parameter is null or emptypublic String getSslProtocol()
public void setSslProtocol(String sslProtocol)
sslProtocol
- the new SSL protocolpublic KeyManager[] getKeyManagers()
public void setKeyManagers(KeyManager[] keyManagers)
keyManagers
- the new key managerspublic SecureRandom getSecureRandom()
public void setSecureRandom(SecureRandom secureRandom)
secureRandom
- the new secure randompublic String[] getEnabledCipherSuites()
public void setEnabledCipherSuites(String[] enabledCipherSuites)
enabledCipherSuites
- the cipher suites which are enabledpublic String[] getEnabledProtocols()
public void setEnabledProtocols(String... enabledProtocols)
enabledProtocols
- the protocols which are enabledpublic BinaryAttributeDetector getBinaryAttributeDetector()
public void setBinaryAttributeDetector(BinaryAttributeDetector binaryAttributeDetector)
binaryAttributeDetector
- the binaryAttributeDetector to setpublic boolean isUseTls()
public void setUseTls(boolean useTls)
useTls
- true to use TLSpublic LdapApiService getLdapApiService()
public void setLdapApiService(LdapApiService ldapApiService)
ldapApiService
- the ldapApiService to setCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.