Liblinphone
5.3.0
|
Object that is used to set the different parameters of a Ldap. More...
#include <ldap_params.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | LdapParams (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneLdapParams * | cPtr () |
LINPHONECXX_PUBLIC linphone::Ldap::AuthMethod | getAuthMethod () const |
Get the authentification method. More... | |
LINPHONECXX_PUBLIC void | setAuthMethod (linphone::Ldap::AuthMethod authMethod) |
Authentification method. More... | |
LINPHONECXX_PUBLIC std::string | getBaseObject () const |
Get the BaseObject. More... | |
LINPHONECXX_PUBLIC void | setBaseObject (const std::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. More... | |
LINPHONECXX_PUBLIC std::string | getBindDn () const |
Get the Bind DN to use for bindings. More... | |
LINPHONECXX_PUBLIC void | setBindDn (const std::string &bindDn) |
Bind DN to use for bindings. More... | |
LINPHONECXX_PUBLIC linphone::Ldap::DebugLevel | getDebugLevel () const |
Return the debug verbosity level. More... | |
LINPHONECXX_PUBLIC void | setDebugLevel (linphone::Ldap::DebugLevel level) |
The debug verbosity level from internal LDAP API. More... | |
LINPHONECXX_PUBLIC int | getDelay () const |
Get the delay between each search in milliseconds. More... | |
LINPHONECXX_PUBLIC void | setDelay (int delay) |
Delay between each search in milliseconds Default value : 500. More... | |
LINPHONECXX_PUBLIC bool | getEnabled () const |
Return if the configuration is enabled. More... | |
LINPHONECXX_PUBLIC void | setEnabled (bool enable) |
If this config is enabled. More... | |
LINPHONECXX_PUBLIC std::string | getFilter () const |
Get the search is based on this filter to search contacts. More... | |
LINPHONECXX_PUBLIC void | setFilter (const std::string &filter) |
The search is based on this filter to search contacts. More... | |
LINPHONECXX_PUBLIC int | getMaxResults () const |
Get the max results when requesting searches. More... | |
LINPHONECXX_PUBLIC void | setMaxResults (int maxResults) |
The max results when requesting searches. More... | |
LINPHONECXX_PUBLIC int | getMinChars () const |
Get the minimum characters needed for doing a search on LDAP servers. More... | |
LINPHONECXX_PUBLIC void | setMinChars (int minChars) |
The minimum characters needed for doing a search on LDAP servers. More... | |
LINPHONECXX_PUBLIC std::string | getNameAttribute () const |
Get the attributes to build Name Friend, separated by a comma and the first is the highest priority. More... | |
LINPHONECXX_PUBLIC void | setNameAttribute (const std::string &nameAttribute) |
Check these attributes to build Name Friend, separated by a comma and the first is the highest priority. More... | |
LINPHONECXX_PUBLIC std::string | getPassword () const |
Get the password to pass to server when binding. More... | |
LINPHONECXX_PUBLIC void | setPassword (const std::string &password) |
The password to pass to server when binding. More... | |
LINPHONECXX_PUBLIC bool | salEnabled () const |
Return if the dns resolution is done by Linphone using Sal. More... | |
LINPHONECXX_PUBLIC void | enableSal (bool enable) |
The dns resolution is done by Linphone using Sal. More... | |
LINPHONECXX_PUBLIC std::string | getServer () const |
Get the LDAP Server. More... | |
LINPHONECXX_PUBLIC void | setServer (const std::string &server) |
LDAP Server. More... | |
LINPHONECXX_PUBLIC linphone::Ldap::CertVerificationMode | getServerCertificatesVerificationMode () const |
Return whether the tls server certificate must be verified when connecting to a LDAP server. More... | |
LINPHONECXX_PUBLIC void | setServerCertificatesVerificationMode (linphone::Ldap::CertVerificationMode verifyServerCertificates) |
Specify whether the tls server certificate must be verified when connecting to a LDAP server. More... | |
LINPHONECXX_PUBLIC std::string | getSipAttribute () const |
Get the attributes to build the SIP username in address of Friend. More... | |
LINPHONECXX_PUBLIC void | setSipAttribute (const std::string &sipAttribute) |
Check these attributes to build the SIP username in address of Friend. More... | |
LINPHONECXX_PUBLIC std::string | getSipDomain () const |
Get the domain to the sip address(sip:username). More... | |
LINPHONECXX_PUBLIC void | setSipDomain (const std::string &sipDomain) |
Add the domain to the sip address(sip:username). More... | |
LINPHONECXX_PUBLIC int | getTimeout () const |
Get the timeout for requests in seconds. More... | |
LINPHONECXX_PUBLIC void | setTimeout (int timeout) |
Timeout for requests in seconds. More... | |
LINPHONECXX_PUBLIC int | getTimeoutTlsMs () const |
Get the timeout for TLS connection in milliseconds. More... | |
LINPHONECXX_PUBLIC void | setTimeoutTlsMs (int timeout) |
Timeout for TLS connection in milliseconds. More... | |
LINPHONECXX_PUBLIC bool | tlsEnabled () const |
Return if transactions are encrypted by LDAP over TLS(StartTLS). More... | |
LINPHONECXX_PUBLIC void | enableTls (bool enable) |
Encrypt transactions by LDAP over TLS(StartTLS). More... | |
LINPHONECXX_PUBLIC int | check () const |
Check parameters and return what are wrong. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::LdapParams > | clone () const |
Instantiate a new LdapParams with values from source. More... | |
LINPHONECXX_PUBLIC std::string | getCustomValue (const std::string &key) const |
Get the value from field. More... | |
LINPHONECXX_PUBLIC void | setCustomValue (const std::string &key, const std::string &value) |
Set custom field. More... | |
Object that is used to set the different parameters of a Ldap.
LINPHONECXX_PUBLIC int linphone::LdapParams::check | ( | ) | const |
Check parameters and return what are wrong.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::LdapParams> linphone::LdapParams::clone | ( | ) | const |
Instantiate a new LdapParams with values from source.
LINPHONECXX_PUBLIC void linphone::LdapParams::enableSal | ( | bool | 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.
enable | Enable or not the use of sal. |
LINPHONECXX_PUBLIC void linphone::LdapParams::enableTls | ( | bool | 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.
enable | Enable or not the use of TLS. |
LINPHONECXX_PUBLIC linphone::Ldap::AuthMethod linphone::LdapParams::getAuthMethod | ( | ) | const |
Get the authentification method.
Check Ldap::AuthMethod for authentification values.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getBaseObject | ( | ) | const |
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.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getBindDn | ( | ) | const |
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
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getCustomValue | ( | const std::string & | key | ) | const |
Get the value from field.
key | The key string. |
LINPHONECXX_PUBLIC linphone::Ldap::DebugLevel linphone::LdapParams::getDebugLevel | ( | ) | const |
Return the debug verbosity level.
LINPHONECXX_PUBLIC int linphone::LdapParams::getDelay | ( | ) | const |
Get the delay between each search in milliseconds.
LINPHONECXX_PUBLIC bool linphone::LdapParams::getEnabled | ( | ) | const |
Return if the configuration is enabled.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getFilter | ( | ) | const |
Get the search is based on this filter to search contacts.
LINPHONECXX_PUBLIC int linphone::LdapParams::getMaxResults | ( | ) | const |
Get the max results when requesting searches.
LINPHONECXX_PUBLIC int linphone::LdapParams::getMinChars | ( | ) | const |
Get the minimum characters needed for doing a search on LDAP servers.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getNameAttribute | ( | ) | const |
Get the attributes to build Name Friend, separated by a comma and the first is the highest priority.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getPassword | ( | ) | const |
Get the password to pass to server when binding.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getServer | ( | ) | const |
Get the LDAP Server.
LINPHONECXX_PUBLIC linphone::Ldap::CertVerificationMode linphone::LdapParams::getServerCertificatesVerificationMode | ( | ) | const |
Return whether the tls server certificate must be verified when connecting to a LDAP server.
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getSipAttribute | ( | ) | const |
LINPHONECXX_PUBLIC std::string linphone::LdapParams::getSipDomain | ( | ) | const |
Get the domain to the sip address(sip:username).
LINPHONECXX_PUBLIC int linphone::LdapParams::getTimeout | ( | ) | const |
Get the timeout for requests in seconds.
LINPHONECXX_PUBLIC int linphone::LdapParams::getTimeoutTlsMs | ( | ) | const |
Get the timeout for TLS connection in milliseconds.
LINPHONECXX_PUBLIC bool linphone::LdapParams::salEnabled | ( | ) | const |
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.
LINPHONECXX_PUBLIC void linphone::LdapParams::setAuthMethod | ( | linphone::Ldap::AuthMethod | authMethod | ) |
Authentification method.
Check Ldap::AuthMethod for authentification values. Default value : LinphoneLdapAuthMethodSimple
authMethod | The Ldap::AuthMethod. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setBaseObject | ( | const std::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.
No entries above it will be considered. This field is required. Default value : "dc=example,dc=com"
baseObject | The specification. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setBindDn | ( | const std::string & | bindDn | ) |
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 : "".
bindDn | The Bind DN to use for bindings. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setCustomValue | ( | const std::string & | key, |
const std::string & | value | ||
) |
Set custom field.
key | The key string. |
value | The value string. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setDebugLevel | ( | linphone::Ldap::DebugLevel | level | ) |
The debug verbosity level from internal LDAP API.
Values are Ldap::DebugLevel Default value: LinphoneLdapDebugLevelOff
level | The Ldap::DebugLevel debug level. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setDelay | ( | int | delay | ) |
Delay between each search in milliseconds Default value : 500.
delay | The timeout in milliseconds. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setEnabled | ( | bool | enable | ) |
If this config is enabled.
Default value : false.
enable | Enable or not the LDAP configuration. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setFilter | ( | const std::string & | filter | ) |
The search is based on this filter to search contacts.
Default value : "(sn=*%s*)".
filter | The filter to use. |
LINPHONECXX_PUBLIC void linphone::LdapParams::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.
maxResults | The max results when requesting searches. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setMinChars | ( | int | minChars | ) |
The minimum characters needed for doing a search on LDAP servers.
Default value : 0.
minChars | The minimum characters needed by a search. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setNameAttribute | ( | const std::string & | nameAttribute | ) |
Check these attributes to build Name Friend, separated by a comma and the first is the highest priority.
Default value : "sn".
nameAttribute | The comma separated attributes for the search. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setPassword | ( | const std::string & | password | ) |
The password to pass to server when binding.
Default value : "".
password | The password to pass to server when binding. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setServer | ( | const std::string & | server | ) |
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.
server | LDAP Server address. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setServerCertificatesVerificationMode | ( | linphone::Ldap::CertVerificationMode | verifyServerCertificates | ) |
Specify whether the tls server certificate must be verified when connecting to a LDAP server.
Values are Ldap::CertVerificationMode Default value : LinphoneLdapCertVerificationDefault (auto)
verifyServerCertificates | The TLS verification mode from Ldap::CertVerificationMode |
LINPHONECXX_PUBLIC void linphone::LdapParams::setSipAttribute | ( | const std::string & | sipAttribute | ) |
LINPHONECXX_PUBLIC void linphone::LdapParams::setSipDomain | ( | const std::string & | sipDomain | ) |
Add the domain to the sip address(sip:username).
By default or if it is empty, the domain will be specify while searching on the current proxy account. Default value : "".
sipDomain | The SIP domain for the friend. |
LINPHONECXX_PUBLIC void linphone::LdapParams::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.
timeout | The timeout in seconds. |
LINPHONECXX_PUBLIC void linphone::LdapParams::setTimeoutTlsMs | ( | int | timeout | ) |
Timeout for TLS connection in milliseconds.
Default value : 1000.
timeout | The timeout in milliseconds. |
LINPHONECXX_PUBLIC bool linphone::LdapParams::tlsEnabled | ( | ) | const |
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.