#[repr(C)]pub struct svn_auth_provider_t {
pub cred_kind: *const c_char,
pub first_credentials: Option<unsafe extern "C" fn(credentials: *mut *mut c_void, iter_baton: *mut *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub next_credentials: Option<unsafe extern "C" fn(credentials: *mut *mut c_void, iter_baton: *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>,
pub save_credentials: Option<unsafe extern "C" fn(saved: *mut svn_boolean_t, credentials: *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>,
}
Expand description
The main authentication “provider” vtable.
Fields§
§cred_kind: *const c_char
The kind of credentials this provider knows how to retrieve.
first_credentials: Option<unsafe extern "C" fn(credentials: *mut *mut c_void, iter_baton: *mut *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>
Get an initial set of credentials.
Set @a *credentials to a set of valid credentials within @a realmstring, or NULL if no credentials are available. Set @a *iter_baton to context that allows a subsequent call to @c next_credentials, in case the first credentials fail to authenticate. @a provider_baton is general context for the vtable, @a parameters contains any run-time data that the provider may need, and @a realmstring comes from the svn_auth_first_credentials() call.
next_credentials: Option<unsafe extern "C" fn(credentials: *mut *mut c_void, iter_baton: *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>
Get a different set of credentials.
Set @a *credentials to another set of valid credentials (using @a iter_baton as the context from previous call to first_credentials or next_credentials). If no more credentials are available, set @a *credentials to NULL. If the provider only has one set of credentials, this function pointer should simply be NULL. @a provider_baton is general context for the vtable, @a parameters contains any run-time data that the provider may need, and @a realmstring comes from the svn_auth_first_credentials() call.
save_credentials: Option<unsafe extern "C" fn(saved: *mut svn_boolean_t, credentials: *mut c_void, provider_baton: *mut c_void, parameters: *mut apr_hash_t, realmstring: *const c_char, pool: *mut apr_pool_t) -> *mut svn_error_t>
Save credentials.
Store @a credentials for future use. @a provider_baton is general context for the vtable, and @a parameters contains any run-time data the provider may need. Set @a *saved to TRUE if the save happened, or FALSE if not. The provider is not required to save; if it refuses or is unable to save for non-fatal reasons, return FALSE. If the provider never saves data, then this function pointer should simply be NULL. @a realmstring comes from the svn_auth_first_credentials() call.
Trait Implementations§
Source§impl Clone for svn_auth_provider_t
impl Clone for svn_auth_provider_t
Source§fn clone(&self) -> svn_auth_provider_t
fn clone(&self) -> svn_auth_provider_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more