Skip to main content

svn_auth_get_simple_provider2

Function svn_auth_get_simple_provider2 

Source
pub unsafe extern "C" fn svn_auth_get_simple_provider2(
    provider: *mut *mut svn_auth_provider_object_t,
    plaintext_prompt_func: svn_auth_plaintext_prompt_func_t,
    prompt_baton: *mut c_void,
    pool: *mut apr_pool_t,
)
Expand description

Set @a *provider to an authentication provider of type @c svn_auth_cred_simple_t that gets/sets information from the user’s ~/.subversion configuration directory.

If the provider is going to save the password unencrypted, it calls @a plaintext_prompt_func, passing @a prompt_baton, before saving the password.

If @a plaintext_prompt_func is NULL it is not called and the answer is assumed to be TRUE. This matches the deprecated behaviour of storing unencrypted passwords by default, and is only done this way for backward compatibility reasons. Client developers are highly encouraged to provide this callback to ensure their users are made aware of the fact that their password is going to be stored unencrypted. In the future, providers may default to not storing the password unencrypted if this callback is NULL.

Clients can however set the callback to NULL and set SVN_AUTH_PARAM_STORE_PLAINTEXT_PASSWORDS to SVN_CONFIG_FALSE or SVN_CONFIG_TRUE to enforce a certain behaviour.

Allocate @a *provider in @a pool.

If a default username or password is available, @a *provider will honor them as well, and return them when svn_auth_first_credentials() is called. (see @c SVN_AUTH_PARAM_DEFAULT_USERNAME and @c SVN_AUTH_PARAM_DEFAULT_PASSWORD).

@since New in 1.6.