Package org.linphone.core
Interface LdapParams
public interface LdapParams
-
Method Summary
Modifier and TypeMethodDescriptionint
check()
Check parameters and return what are wrong.clone()
Instantiate a newLdapParams
with values from source.Get the authentification method.Get the BaseObject.Get the Bind DN to use for bindings.getCustomValue
(String key) Get the value from field.Return the debug verbosity level.int
getDelay()
Get the delay between each search in milliseconds.boolean
Return if the configuration is enabled.Get the search is based on this filter to search contacts.int
Get the max results when requesting searches.int
Get the minimum characters needed for doing a search on LDAP servers.Get the attributes to build Name Friend, separated by a comma and the first is
the highest priority.long
Gets the native pointer used by this class to make native method calls.Get the password to pass to server when binding.Get the LDAP Server.Return whether the tls server certificate must be verified when connecting to a
LDAP server.Get the attributes to build the SIP username in address of Friend.Get the domain to the sip address(sip:username@domain).int
Get the timeout for requests in seconds.int
Get the timeout for TLS connection in milliseconds.Gets the object stored in this object user's databoolean
Return if the dns resolution is done by Linphone using Sal.boolean
Return if transactions are encrypted by LDAP over TLS(StartTLS).void
setAuthMethod
(Ldap.AuthMethod authMethod) Authentification method.void
setBaseObject
(String baseObject) BaseObject is a specification for LDAP Search Scopes that specifies that the
Search Request should only be performed against the entry specified as the
search base DN.void
Bind DN to use for bindings.void
setCustomValue
(String key, String value) Set custom field.void
setDebugLevel
(Ldap.DebugLevel level) The debug verbosity level from internal LDAP API.void
setDelay
(int delay) Delay between each search in milliseconds Default value : 500.void
setEnabled
(boolean enable) If this config is enabled.void
The search is based on this filter to search contacts.void
setMaxResults
(int maxResults) The max results when requesting searches.void
setMinChars
(int minChars) The minimum characters needed for doing a search on LDAP servers.void
setNameAttribute
(String nameAttribute) Check these attributes to build Name Friend, separated by a comma and the first
is the highest priority.void
setPassword
(String password) The password to pass to server when binding.void
setSalEnabled
(boolean enable) The dns resolution is done by Linphone using Sal.void
LDAP Server.void
setServerCertificatesVerificationMode
(Ldap.CertVerificationMode verifyServerCertificates) Specify whether the tls server certificate must be verified when connecting to
a LDAP server.void
setSipAttribute
(String sipAttribute) Check these attributes to build the SIP username in address of Friend.void
setSipDomain
(String sipDomain) Add the domain to the sip address(sip:username@domain).void
setTimeout
(int timeout) Timeout for requests in seconds.void
setTimeoutTlsMs
(int timeout) Timeout for TLS connection in milliseconds.void
setTlsEnabled
(boolean enable) Encrypt transactions by LDAP over TLS(StartTLS).void
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getAuthMethod
Ldap.AuthMethod getAuthMethod()Get the authentification method.
CheckLdap#AuthMethod
for authentification values.- Returns:
- The
Ldap#AuthMethod
.
-
setAuthMethod
Authentification method.
CheckLdap#AuthMethod
for authentification values. Default value :
LinphoneLdapAuthMethodSimple- Parameters:
authMethod
- TheLdap#AuthMethod
.
-
getBaseObject
Get the BaseObject.
It is a specification for LDAP Search Scopes that specifies that the Search
Request should only be performed against the entry specified as the search base
DN. No entries above it will be considered. This field is required.- Returns:
- The specification.
-
setBaseObject
BaseObject is a specification for LDAP Search Scopes that specifies that the
Search Request should only be performed against the entry specified as the
search base DN.
No entries above it will be considered. This field is required. Default value :
"dc=example,dc=com"- Parameters:
baseObject
- The specification.
-
getBindDn
Get the Bind DN to use for bindings.
The bindDN DN is the credential that is used to authenticate against an LDAP.
If empty, the connection will be Anonymous. eg:
cn=ausername,ou=people,dc=bc,dc=com- Returns:
- The Bind DN to use for bindings.
-
setBindDn
Bind DN to use for bindings.
The bindDN DN is the credential that is used to authenticate against an LDAP.
If empty, the connection will be Anonymous. eg:
cn=ausername,ou=people,dc=bc,dc=com Default value : "".- Parameters:
bindDn
- The Bind DN to use for bindings.
-
getDebugLevel
Ldap.DebugLevel getDebugLevel()Return the debug verbosity level.
- Returns:
- The
Ldap#DebugLevel
debug level.
-
setDebugLevel
The debug verbosity level from internal LDAP API.
Values areLdap#DebugLevel
Default value: LinphoneLdapDebugLevelOff- Parameters:
level
- TheLdap#DebugLevel
debug level.
-
getDelay
int getDelay()Get the delay between each search in milliseconds.
- Returns:
- The delay in milliseconds.
-
setDelay
void setDelay(int delay) Delay between each search in milliseconds Default value : 500.
- Parameters:
delay
- The timeout in milliseconds.
-
getEnabled
boolean getEnabled()Return if the configuration is enabled.
- Returns:
- Enable or not the LDAP configuration.
-
setEnabled
void setEnabled(boolean enable) If this config is enabled.
Default value : false.- Parameters:
enable
- Enable or not the LDAP configuration.
-
getFilter
Get the search is based on this filter to search contacts.
- Returns:
- The filter to use.
-
setFilter
The search is based on this filter to search contacts.
Default value : "(sn=*%s*)".- Parameters:
filter
- The filter to use.
-
getMaxResults
int getMaxResults()Get the max results when requesting searches.
- Returns:
- The max results when requesting searches.
-
setMaxResults
void setMaxResults(int maxResults) The max results when requesting searches.
Default value : 5. This value fit for standard cases where only first results
are needed. Also, it avoids latency on each searchs.- Parameters:
maxResults
- The max results when requesting searches.
-
getMinChars
int getMinChars()Get the minimum characters needed for doing a search on LDAP servers.
- Returns:
- The minimum characters needed by a search.
-
setMinChars
void setMinChars(int minChars) The minimum characters needed for doing a search on LDAP servers.
Default value : 0.- Parameters:
minChars
- The minimum characters needed by a search.
-
getNameAttribute
Get the attributes to build Name Friend, separated by a comma and the first is
the highest priority.
- Returns:
- The comma separated attributes for the search.
-
setNameAttribute
Check these attributes to build Name Friend, separated by a comma and the first
is the highest priority.
Default value : "sn".- Parameters:
nameAttribute
- The comma separated attributes for the search.
-
getPassword
Get the password to pass to server when binding.
- Returns:
- The password to pass to server when binding.
-
setPassword
The password to pass to server when binding.
Default value : "".- Parameters:
password
- The password to pass to server when binding.
-
isSalEnabled
boolean isSalEnabled()Return if the dns resolution is done by Linphone using Sal.
It will pass an IP to LDAP. By doing that, the TLS negociation could not check
the hostname. You may deactivate the verifications if wanted to force the
connection.- Returns:
- Enable or not the use of sal.
-
setSalEnabled
void setSalEnabled(boolean enable) The dns resolution is done by Linphone using Sal.
It will pass an IP to LDAP. By doing that, the TLS negociation could not check
the hostname. You may deactivate the verifications if wanted to force the
connection. Default value : false.- Parameters:
enable
- Enable or not the use of sal.
-
getServer
Get the LDAP Server.
- Returns:
- LDAP Server address.
-
setServer
LDAP Server.
eg: ldap:/// for a localhost server or ldap://ldap.example.org/ Default value:
"ldap:///". This field is required.
You must use 'ldap' scheme. 'ldaps' for LDAP over SSL is non-standardized and
deprecated.- Parameters:
server
- LDAP Server address.
-
getServerCertificatesVerificationMode
Ldap.CertVerificationMode getServerCertificatesVerificationMode()Return whether the tls server certificate must be verified when connecting to a
LDAP server.
- Returns:
- The TLS verification mode from
Ldap#CertVerificationMode
-
setServerCertificatesVerificationMode
Specify whether the tls server certificate must be verified when connecting to
a LDAP server.
Values areLdap#CertVerificationMode
Default value :
LinphoneLdapCertVerificationDefault (auto)- Parameters:
verifyServerCertificates
- The TLS verification mode fromLdap#CertVerificationMode
-
getSipAttribute
Get the attributes to build the SIP username in address of Friend.
Attributes are separated by a comma.- Returns:
- The comma separated attributes for building Friend.
-
setSipAttribute
Check these attributes to build the SIP username in address of Friend.
Attributes are separated by a comma. Default value :
"mobile,telephoneNumber,homePhone,sn".- Parameters:
sipAttribute
- The comma separated attributes for building Friend.
-
getSipDomain
Get the domain to the sip address(sip:username@domain).
- Returns:
- The SIP domain for the friend.
-
setSipDomain
Add the domain to the sip address(sip:username@domain).
By default or if it is empty, the domain will be specify while searching on the
current proxy account. Default value : "".- Parameters:
sipDomain
- The SIP domain for the friend.
-
getTimeout
int getTimeout()Get the timeout for requests in seconds.
- Returns:
- The timeout in seconds.
-
setTimeout
void setTimeout(int timeout) Timeout for requests in seconds.
It limits the time for searchs and the value is passed to Ldap with
LDAP_OPT_NETWORK_TIMEOUT. Default value : 5.- Parameters:
timeout
- The timeout in seconds.
-
getTimeoutTlsMs
int getTimeoutTlsMs()Get the timeout for TLS connection in milliseconds.
- Returns:
- The timeout in milliseconds.
-
setTimeoutTlsMs
void setTimeoutTlsMs(int timeout) Timeout for TLS connection in milliseconds.
Default value : 1000.- Parameters:
timeout
- The timeout in milliseconds.
-
isTlsEnabled
boolean isTlsEnabled()Return if transactions are encrypted by LDAP over TLS(StartTLS).
You must use \'ldap\' scheme. \'ldaps\' for LDAP over SSL is non-standardized
and deprecated. StartTLS in an extension to the LDAP protocol which uses the
TLS protocol to encrypt communication. It works by establishing a normal - i.e.
unsecured - connection with the LDAP server before a handshake negotiation
between the server and the web services is carried out. Here, the server sends
its certificate to prove its identity before the secure connection is
established.- Returns:
- Enable or not the use of TLS.
-
setTlsEnabled
void setTlsEnabled(boolean enable) Encrypt transactions by LDAP over TLS(StartTLS).
You must use 'ldap' scheme. 'ldaps' for LDAP over SSL is non-standardized and
deprecated. StartTLS in an extension to the LDAP protocol which uses the TLS
protocol to encrypt communication. It works by establishing a normal - i.e.
unsecured - connection with the LDAP server before a handshake negotiation
between the server and the web services is carried out. Here, the server sends
its certificate to prove its identity before the secure connection is
established. Default value : true.- Parameters:
enable
- Enable or not the use of TLS.
-
check
int check()Check parameters and return what are wrong.
- Returns:
- The
Ldap#Check
values. LinphoneLdapCheckOk if everything is ok.
-
clone
- Returns:
- The newly created
LdapParams
object.
-
getCustomValue
Get the value from field.
- Parameters:
key
- The key string.- Returns:
- The Value associated to the key.
-
setCustomValue
Set custom field.
- Parameters:
key
- The key string.value
- The value string.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-