|
VLC 4.0.0-dev
|
Data Structures | |
| struct | vlc_credential |
Macros | |
| #define | vlc_credential_get(a, b, c, d, e, f, ...) |
| #define | vlc_credential_store(a, b) |
| #define | vlc_credential_get_bearer(a, b) |
Functions | |
| void | vlc_credential_init (vlc_credential *p_credential, const vlc_url_t *p_url) |
| Init a credential struct. | |
| void | vlc_credential_clean (vlc_credential *p_credential) |
| Clean a credential struct. | |
| int | vlc_credential_get (vlc_credential *p_credential, vlc_object_t *p_parent, const char *psz_option_username, const char *psz_option_password, const char *psz_dialog_title, const char *psz_dialog_fmt,...) |
| Get a username/password couple. | |
| bool | vlc_credential_store (vlc_credential *p_credential, vlc_object_t *p_parent) |
| Store the last dialog credential returned by vlc_credential_get(). | |
| int | vlc_credential_get_bearer (vlc_credential *p_credential, vlc_object_t *p_parent) |
| Look up a bearer token for the URL, realm and scopes set on p_credential. | |
| int | libvlc_InternalHttpBearerStore (libvlc_int_t *p_libvlc, const char *psz_origin, const char *psz_realm, const char *const *ppsz_scopes, size_t i_scopes, const char *psz_token) |
| Store a bearer token for an HTTPS origin URL in the per-libvlc memory keystore. | |
| #define vlc_credential_get | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| ... ) |
Referenced by Open().
| #define vlc_credential_get_bearer | ( | a, | |
| b ) |
Referenced by Open().
| #define vlc_credential_store | ( | a, | |
| b ) |
Referenced by Open().
| int libvlc_InternalHttpBearerStore | ( | libvlc_int_t * | p_libvlc, |
| const char * | psz_origin, | ||
| const char * | psz_realm, | ||
| const char *const * | ppsz_scopes, | ||
| size_t | i_scopes, | ||
| const char * | psz_token ) |
Store a bearer token for an HTTPS origin URL in the per-libvlc memory keystore.
The token replaces, scope by scope, any token previously stored for the same origin and realm. A NULL realm matches any realm and an empty scope list matches any scope, so a token stored with neither replaces all tokens of the origin.
If psz_token is NULL, the matching tokens are removed.
References bearer_values_init(), get_memory_keystore(), vlc_url_t::i_port, is_url_valid(), KEY_MAX, KEY_SCOPE, VLC_EGENERIC, vlc_keystore_remove(), vlc_keystore_store(), VLC_OBJECT, VLC_SUCCESS, vlc_UrlClean(), and vlc_UrlParse().
| void vlc_credential_clean | ( | vlc_credential * | p_credential | ) |
Clean a credential struct.
References vlc_credential::i_bearer_entries_count, vlc_credential::i_entries_count, vlc_credential::p_bearer_entries, vlc_credential::p_entries, vlc_credential::p_keystore, vlc_credential::psz_dialog_password, vlc_credential::psz_dialog_username, vlc_credential::psz_split_domain, vlc_credential::psz_var_password, vlc_credential::psz_var_username, vlc_keystore_release(), and vlc_keystore_release_entries().
Referenced by Open().
| int vlc_credential_get | ( | vlc_credential * | p_credential, |
| vlc_object_t * | p_parent, | ||
| const char * | psz_option_username, | ||
| const char * | psz_option_password, | ||
| const char * | psz_dialog_title, | ||
| const char * | psz_dialog_fmt, | ||
| ... ) |
Get a username/password couple.
This will search for a credential using url, VLC options, the vlc_keystore or by asking the user via dialog_Login(). This function can be called indefinitely, it will first return the user/password from the url (if any), then from VLC options (if any), then from the keystore (if any), and finally from the dialog (if any). This function will return true as long as the user fill the dialog texts and will return false when the user cancel it.
| p_credential | a credential instance initialized with TODO |
| p_parent | the parent object (for var, keystore and dialog) |
| psz_option_username | VLC option name for the username |
| psz_option_password | VLC option name for the password |
| psz_dialog_title | dialog title, if NULL, this function won't use the keystore or the dialog |
| psz_dialog_fmt | dialog text using format |
References vlc_credential::b_from_keystore, vlc_credential::b_store, credential_find_keystore(), get_memory_keystore(), vlc_credential::i_get_order, is_credential_valid(), is_url_valid(), msg_Err, msg_Warn, vlc_credential::p_keystore, vlc_credential::p_url, protocol_is_smb(), vlc_credential::psz_dialog_password, vlc_credential::psz_dialog_username, vlc_credential::psz_password, vlc_url_t::psz_password, vlc_credential::psz_username, vlc_url_t::psz_username, vlc_credential::psz_var_password, vlc_credential::psz_var_username, smb_split_domain(), var_InheritString(), vlc_dialog_wait_login_va(), vlc_keystore_create, and vlc_killed().
| int vlc_credential_get_bearer | ( | vlc_credential * | p_credential, |
| vlc_object_t * | p_parent ) |
Look up a bearer token for the URL, realm and scopes set on p_credential.
References vlc_credential::b_from_keystore, bearer_lookup(), bearer_values_init(), get_memory_keystore(), is_url_valid(), KEY_MAX, msg_Err, vlc_credential::p_url, vlc_credential::psz_realm, and vlc_credential::psz_token.
| void vlc_credential_init | ( | vlc_credential * | p_credential, |
| const vlc_url_t * | p_url ) |
Init a credential struct.
| p_credential | a credential instance to initialize |
| p_url | url to store or to search |
References vlc_credential::i_get_order, and vlc_credential::p_url.
Referenced by Open().
| bool vlc_credential_store | ( | vlc_credential * | p_credential, |
| vlc_object_t * | p_parent ) |
Store the last dialog credential returned by vlc_credential_get().
This function will store the credential in the memory keystore if it's valid, or will store in the permanent one if it comes from the dialog and if the user asked for it.
References asprintf(), vlc_credential::b_from_keystore, vlc_credential::b_store, get_memory_keystore(), is_credential_valid(), KEY_AUTHTYPE, KEY_MAX, KEY_PATH, KEY_PORT, KEY_PROTOCOL, KEY_REALM, KEY_SERVER, KEY_USER, vlc_credential::p_keystore, vlc_credential::p_url, protocol_is_smb(), protocol_set_port(), protocol_store_path(), vlc_credential::psz_authtype, vlc_url_t::psz_host, psz_label, vlc_credential::psz_password, vlc_url_t::psz_path, vlc_url_t::psz_protocol, vlc_credential::psz_realm, vlc_credential::psz_username, vlc_keystore_store(), VLC_SUCCESS, and vlc_uri_decode_duplicate().