|
LinphoneAuthInfo * | linphone_auth_info_new (const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain) |
| Creates a LinphoneAuthInfo object with supplied information. More...
|
|
LinphoneAuthInfo * | linphone_auth_info_clone (const LinphoneAuthInfo *source) |
| Instantiates a new auth info with values from source. More...
|
|
LinphoneAuthInfo * | linphone_auth_info_ref (LinphoneAuthInfo *info) |
| Take a reference on a LinphoneAuthInfo.
|
|
void | linphone_auth_info_unref (LinphoneAuthInfo *info) |
| Release a LinphoneAuthInfo.
|
|
void | linphone_auth_info_set_passwd (LinphoneAuthInfo *info, const char *passwd) |
| Sets the password. More...
|
|
void | linphone_auth_info_set_username (LinphoneAuthInfo *info, const char *username) |
| Sets the username. More...
|
|
void | linphone_auth_info_set_userid (LinphoneAuthInfo *info, const char *userid) |
| Sets the userid. More...
|
|
void | linphone_auth_info_set_realm (LinphoneAuthInfo *info, const char *realm) |
| Sets the realm. More...
|
|
void | linphone_auth_info_set_domain (LinphoneAuthInfo *info, const char *domain) |
| Sets the domain for which this authentication is valid. More...
|
|
void | linphone_auth_info_set_ha1 (LinphoneAuthInfo *info, const char *ha1) |
| Sets the ha1. More...
|
|
void | linphone_auth_info_set_tls_cert (LinphoneAuthInfo *info, const char *tls_cert) |
| Sets the TLS certificate. More...
|
|
void | linphone_auth_info_set_tls_key (LinphoneAuthInfo *info, const char *tls_key) |
| Sets the TLS key. More...
|
|
void | linphone_auth_info_set_tls_cert_path (LinphoneAuthInfo *info, const char *tls_cert_path) |
| Sets the TLS certificate path. More...
|
|
void | linphone_auth_info_set_tls_key_path (LinphoneAuthInfo *info, const char *tls_key_path) |
| Sets the TLS key path. More...
|
|
const char * | linphone_auth_info_get_username (const LinphoneAuthInfo *info) |
| Gets the username. More...
|
|
const char * | linphone_auth_info_get_passwd (const LinphoneAuthInfo *info) |
| Gets the password. More...
|
|
const char * | linphone_auth_info_get_userid (const LinphoneAuthInfo *info) |
| Gets the userid. More...
|
|
const char * | linphone_auth_info_get_realm (const LinphoneAuthInfo *info) |
| Gets the realm. More...
|
|
const char * | linphone_auth_info_get_domain (const LinphoneAuthInfo *info) |
| Gets the domain. More...
|
|
const char * | linphone_auth_info_get_ha1 (const LinphoneAuthInfo *info) |
| Gets the ha1. More...
|
|
const char * | linphone_auth_info_get_tls_cert (const LinphoneAuthInfo *info) |
| Gets the TLS certificate. More...
|
|
const char * | linphone_auth_info_get_tls_key (const LinphoneAuthInfo *info) |
| Gets the TLS key. More...
|
|
const char * | linphone_auth_info_get_tls_cert_path (const LinphoneAuthInfo *info) |
| Gets the TLS certificate path. More...
|
|
const char * | linphone_auth_info_get_tls_key_path (const LinphoneAuthInfo *info) |
| Gets the TLS key path. More...
|
|
LINPHONE_DEPRECATED void | linphone_auth_info_destroy (LinphoneAuthInfo *info) |
|
LinphoneAuthInfo * | linphone_core_create_auth_info (LinphoneCore *lc, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain) |
| Create an authentication information with default values from Linphone core. More...
|
|
void | linphone_core_add_auth_info (LinphoneCore *lc, const LinphoneAuthInfo *info) |
| Adds authentication information to the LinphoneCore. More...
|
|
void | linphone_core_remove_auth_info (LinphoneCore *lc, const LinphoneAuthInfo *info) |
| Removes an authentication information object. More...
|
|
const bctbx_list_t * | linphone_core_get_auth_info_list (const LinphoneCore *lc) |
| Returns an unmodifiable list of currently entered LinphoneAuthInfo. More...
|
|
const LinphoneAuthInfo * | linphone_core_find_auth_info (LinphoneCore *lc, const char *realm, const char *username, const char *sip_domain) |
| Find authentication info matching realm, username, domain criteria. More...
|
|
void | linphone_core_clear_all_auth_info (LinphoneCore *lc) |
| Clear all authentication information.
|
|
Managing authentication: userid and passwords.
Object holding authentication information.
- Note
- The object's fields should not be accessed directly. Prefer using the accessor methods.
In most case, authentication information consists of a username and password. Sometimes, a userid is required by proxy, and realm can be useful to discriminate different SIP domains.
Once created and filled, a LinphoneAuthInfo must be added to the LinphoneCore in order to become known and used automatically when needed. Use linphone_core_add_auth_info() for that purpose.
The LinphoneCore object can take the initiative to request authentication information when needed to the application through the auth_info_requested callback of the LinphoneCoreVTable structure.
The application can respond to this information request later using linphone_core_add_auth_info(). This will unblock all pending authentication transactions and retry them with authentication headers.
LinphoneAuthInfo* linphone_auth_info_new |
( |
const char * |
username, |
|
|
const char * |
userid, |
|
|
const char * |
passwd, |
|
|
const char * |
ha1, |
|
|
const char * |
realm, |
|
|
const char * |
domain |
|
) |
| |
Creates a LinphoneAuthInfo object with supplied information.
The object can be created empty, that is with all arguments set to NULL. Username, userid, password, realm and domain can be set later using specific methods. At the end, username and passwd (or ha1) are required.
- Parameters
-
username | The username that needs to be authenticated |
userid | The userid used for authenticating (use NULL if you don't know what it is) |
passwd | The password in clear text |
ha1 | The ha1-encrypted password if password is not given in clear text. |
realm | The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter. |
domain | The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain. |
- Returns
- A LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The LinphoneCore makes a copy of LinphoneAuthInfo passed through linphone_core_add_auth_info().