00001 /**
00002 * @copyright
00003 * ====================================================================
00004 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
00005 *
00006 * This software is licensed as described in the file COPYING, which
00007 * you should have received as part of this distribution. The terms
00008 * are also available at http://subversion.tigris.org/license-1.html.
00009 * If newer versions of this license are posted there, you may use a
00010 * newer version instead, at your option.
00011 *
00012 * This software consists of voluntary contributions made by many
00013 * individuals. For exact contribution history, see the revision
00014 * history and logs, available at http://subversion.tigris.org/.
00015 * ====================================================================
00016 * @endcopyright
00017 *
00018 * @file svn_auth.h
00019 * @brief Subversion's authentication system
00020 */
00021
00022 #ifndef SVN_AUTH_H
00023 #define SVN_AUTH_H
00024
00025 #include <apr_pools.h>
00026
00027 #include "svn_types.h"
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif /* __cplusplus */
00032
00033 /** Overview of the svn authentication system.
00034 *
00035 * We define an authentication "provider" as a module that is able to
00036 * return a specific set of credentials. (e.g. username/password,
00037 * certificate, etc.) Each provider implements a vtable that
00038 *
00039 * - can fetch initial credentials
00040 * - can retry the fetch (or try to fetch something different)
00041 * - can store the credentials for future use
00042 *
00043 * For any given type of credentials, there can exist any number of
00044 * separate providers -- each provider has a different method of
00045 * fetching. (i.e. from a disk store, by prompting the user, etc.)
00046 *
00047 * The application begins by creating an auth baton object, and
00048 * "registers" some number of providers with the auth baton, in a
00049 * specific order. (For example, it may first register a
00050 * username/password provider that looks in disk store, then register
00051 * a username/password provider that prompts the user.)
00052 *
00053 * Later on, when any svn library is challenged, it asks the auth
00054 * baton for the specific credentials. If the initial credentials
00055 * fail to authenticate, the caller keeps requesting new credentials.
00056 * Under the hood, libsvn_auth effectively "walks" over each provider
00057 * (in order of registry), one at a time, until all the providers have
00058 * exhausted all their retry options.
00059 *
00060 * This system allows an application to flexibly define authentication
00061 * behaviors (by changing registration order), and very easily write
00062 * new authentication providers.
00063 *
00064 * An auth_baton also contains an internal hashtable of run-time
00065 * parameters; any provider or library layer can set these run-time
00066 * parameters at any time, so that the provider has access to the
00067 * data. (For example, certain run-time data may not be available
00068 * until an authentication challenge is made.) Each credential type
00069 * must document the run-time parameters that are made available to
00070 * its providers.
00071 *
00072 * @defgroup auth_fns authentication functions
00073 * @{
00074 */
00075
00076
00077 /** The type of a Subversion authentication object */
00078 typedef struct svn_auth_baton_t svn_auth_baton_t;
00079
00080 /** The type of a Subversion authentication-iteration object */
00081 typedef struct svn_auth_iterstate_t svn_auth_iterstate_t;
00082
00083
00084 /** The main authentication "provider" vtable. */
00085 typedef struct svn_auth_provider_t
00086 {
00087 /** The kind of credentials this provider knows how to retrieve. */
00088 const char *cred_kind;
00089
00090 /** Get an initial set of credentials.
00091 *
00092 * Set @a *credentials to a set of valid credentials within @a
00093 * realmstring, or NULL if no credentials are available. Set @a
00094 * *iter_baton to context that allows a subsequent call to @c
00095 * next_credentials, in case the first credentials fail to
00096 * authenticate. @a provider_baton is general context for the
00097 * vtable, @a parameters contains any run-time data that the
00098 * provider may need, and @a realmstring comes from the
00099 * svn_auth_first_credentials() call.
00100 */
00101 svn_error_t * (*first_credentials) (void **credentials,
00102 void **iter_baton,
00103 void *provider_baton,
00104 apr_hash_t *parameters,
00105 const char *realmstring,
00106 apr_pool_t *pool);
00107
00108 /** Get a different set of credentials.
00109 *
00110 * Set @a *credentials to another set of valid credentials, (using
00111 * @a iter_baton as the context from previous call to first_credentials
00112 * or next_credentials). If no more credentials are available, set
00113 * @a *credentials to NULL. If the provider only has one set of
00114 * credentials, this function pointer should simply be NULL. @a
00115 * provider_baton is general context for the vtable, @a parameters
00116 * contains any run-time data that the provider may need, and @a
00117 * realmstring comes from the svn_auth_first_credentials() call.
00118 */
00119 svn_error_t * (*next_credentials) (void **credentials,
00120 void *iter_baton,
00121 void *provider_baton,
00122 apr_hash_t *parameters,
00123 const char *realmstring,
00124 apr_pool_t *pool);
00125
00126 /** Save credentials.
00127 *
00128 * Store @a credentials for future use. @a provider_baton is
00129 * general context for the vtable, and @a parameters contains any
00130 * run-time data the provider may need. Set @a *saved to true if
00131 * the save happened, or false if not. The provider is not required
00132 * to save; if it refuses or is unable to save for non-fatal
00133 * reasons, return false. If the provider never saves data, then
00134 * this function pointer should simply be NULL. @a realmstring comes
00135 * from the svn_auth_first_credentials() call.
00136 */
00137 svn_error_t * (*save_credentials) (svn_boolean_t *saved,
00138 void *credentials,
00139 void *provider_baton,
00140 apr_hash_t *parameters,
00141 const char *realmstring,
00142 apr_pool_t *pool);
00143
00144 } svn_auth_provider_t;
00145
00146
00147 /** A provider object, ready to be put into an array and given to
00148 svn_auth_open(). */
00149 typedef struct svn_auth_provider_object_t
00150 {
00151 const svn_auth_provider_t *vtable;
00152 void *provider_baton;
00153
00154 } svn_auth_provider_object_t;
00155
00156
00157
00158 /** Specific types of credentials **/
00159
00160 /** Simple username/password pair credential kind.
00161 *
00162 * The following auth parameters may be available to the providers:
00163 *
00164 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*)
00165 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*)
00166 * - @c SVN_AUTH_PARAM_DEFAULT_PASSWORD (@c char*)
00167 */
00168 #define SVN_AUTH_CRED_SIMPLE "svn.simple"
00169
00170 /** @c SVN_AUTH_CRED_SIMPLE credentials. */
00171 typedef struct svn_auth_cred_simple_t
00172 {
00173 /** Username */
00174 const char *username;
00175 /** Password */
00176 const char *password;
00177 /** Indicates if the credentials may be saved (to disk). For example, a
00178 * GUI prompt implementation with a remember password checkbox shall set
00179 * @a may_save to TRUE if the checkbox is checked.
00180 */
00181 svn_boolean_t may_save;
00182 } svn_auth_cred_simple_t;
00183
00184
00185 /** Username credential kind.
00186 *
00187 * The following optional auth parameters are relevant to the providers:
00188 *
00189 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*)
00190 * - @c SVN_AUTH_PARAM_DEFAULT_USERNAME (@c char*)
00191 */
00192 #define SVN_AUTH_CRED_USERNAME "svn.username"
00193
00194 /** @c SVN_AUTH_CRED_USERNAME credentials. */
00195 typedef struct svn_auth_cred_username_t
00196 {
00197 /** Username */
00198 const char *username;
00199 /** Indicates if the credentials may be saved (to disk). For example, a
00200 * GUI prompt implementation with a remember username checkbox shall set
00201 * @a may_save to TRUE if the checkbox is checked.
00202 */
00203 svn_boolean_t may_save;
00204 } svn_auth_cred_username_t;
00205
00206
00207 /** SSL client certificate credential type.
00208 *
00209 * The following auth parameters are available to the providers:
00210 *
00211 * - @c SVN_AUTH_PARAM_CONFIG (@c svn_config_t*)
00212 * - @c SVN_AUTH_PARAM_SERVER_GROUP (@c char*)
00213 *
00214 * The following optional auth parameters are relevant to the providers:
00215 *
00216 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*)
00217 */
00218 #define SVN_AUTH_CRED_SSL_CLIENT_CERT "svn.ssl.client-cert"
00219
00220 /** @c SVN_AUTH_CRED_SSL_CLIENT_CERT credentials. */
00221 typedef struct svn_auth_cred_ssl_client_cert_t
00222 {
00223 /** Full paths to the certificate file */
00224 const char *cert_file;
00225 /** Indicates if the credentials may be saved (to disk). For example, a
00226 * GUI prompt implementation with a remember certificate checkbox shall
00227 * set @a may_save to TRUE if the checkbox is checked.
00228 */
00229 svn_boolean_t may_save;
00230 } svn_auth_cred_ssl_client_cert_t;
00231
00232
00233 /** SSL client certificate passphrase credential type.
00234 *
00235 * @note The realmstring used with this credential type must be a name that
00236 * makes it possible for the user to identify the certificate.
00237 *
00238 * The following auth parameters are available to the providers:
00239 *
00240 * - @c SVN_AUTH_PARAM_CONFIG (@c svn_config_t*)
00241 * - @c SVN_AUTH_PARAM_SERVER_GROUP (@c char*)
00242 *
00243 * The following optional auth parameters are relevant to the providers:
00244 *
00245 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*)
00246 */
00247 #define SVN_AUTH_CRED_SSL_CLIENT_CERT_PW "svn.ssl.client-passphrase"
00248
00249 /** @c SVN_AUTH_CRED_SSL_CLIENT_CERT_PW credentials. */
00250 typedef struct svn_auth_cred_ssl_client_cert_pw_t
00251 {
00252 /** Certificate password */
00253 const char *password;
00254 /** Indicates if the credentials may be saved (to disk). For example, a
00255 * GUI prompt implementation with a remember password checkbox shall set
00256 * @a may_save to TRUE if the checkbox is checked.
00257 */
00258 svn_boolean_t may_save;
00259 } svn_auth_cred_ssl_client_cert_pw_t;
00260
00261
00262 /** SSL server verification credential type.
00263 *
00264 * The following auth parameters are available to the providers:
00265 *
00266 * - @c SVN_AUTH_PARAM_CONFIG (@c svn_config_t*)
00267 * - @c SVN_AUTH_PARAM_SERVER_GROUP (@c char*)
00268 * - @c SVN_AUTH_PARAM_SSL_SERVER_FAILURES (@c apr_uint32_t*)
00269 * - @c SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO
00270 * (@c svn_auth_ssl_server_cert_info_t*)
00271 *
00272 * The following optional auth parameters are relevant to the providers:
00273 *
00274 * - @c SVN_AUTH_PARAM_NO_AUTH_CACHE (@c void*)
00275 */
00276 #define SVN_AUTH_CRED_SSL_SERVER_TRUST "svn.ssl.server"
00277
00278 /** SSL server certificate information used by @c
00279 * SVN_AUTH_CRED_SSL_SERVER_TRUST providers.
00280 */
00281 typedef struct svn_auth_ssl_server_cert_info_t
00282 {
00283 /** Primary CN */
00284 const char *hostname;
00285 /** ASCII fingerprint */
00286 const char *fingerprint;
00287 /** ASCII date from which the certificate is valid */
00288 const char *valid_from;
00289 /** ASCII date until which the certificate is valid */
00290 const char *valid_until;
00291 /** DN of the certificate issuer */
00292 const char *issuer_dname;
00293 /** Base-64 encoded DER certificate representation */
00294 const char *ascii_cert;
00295 } svn_auth_ssl_server_cert_info_t;
00296
00297 /**
00298 * Return a deep copy of @a info, allocated in @a pool.
00299 *
00300 * @since New in 1.3.
00301 */
00302 svn_auth_ssl_server_cert_info_t *svn_auth_ssl_server_cert_info_dup (
00303 const svn_auth_ssl_server_cert_info_t *info, apr_pool_t *pool);
00304
00305 /** @c SVN_AUTH_CRED_SSL_SERVER_TRUST credentials. */
00306 typedef struct svn_auth_cred_ssl_server_trust_t
00307 {
00308 /** Indicates if the credentials may be saved (to disk). For example, a
00309 * GUI prompt implementation with a checkbox to accept the certificate
00310 * permanently shall set @a may_save to TRUE if the checkbox is checked.
00311 */
00312 svn_boolean_t may_save;
00313 /** Bit mask of the accepted failures */
00314 apr_uint32_t accepted_failures;
00315 } svn_auth_cred_ssl_server_trust_t;
00316
00317
00318
00319 /** Credential-constructing prompt functions. **/
00320
00321 /** These exist so that different client applications can use
00322 * different prompt mechanisms to supply the same credentials. For
00323 * example, if authentication requires a username and password, a
00324 * command-line client's prompting function might prompt first for the
00325 * username and then for the password, whereas a GUI client's would
00326 * present a single dialog box asking for both, and a telepathic
00327 * client's would read all the information directly from the user's
00328 * mind. All these prompting functions return the same type of
00329 * credential, but the information used to construct the credential is
00330 * gathered in an interface-specific way in each case.
00331 */
00332
00333 /** Set @a *cred by prompting the user, allocating @a *cred in @a pool.
00334 * @a baton is an implementation-specific closure.
00335 *
00336 * If @a realm is non-null, maybe use it in the prompt string.
00337 *
00338 * If @a username is non-null, then the user might be prompted only
00339 * for a password, but @a *creds would still be filled with both
00340 * username and password. For example, a typical usage would be to
00341 * pass @a username on the first call, but then leave it null for
00342 * subsequent calls, on the theory that if credentials failed, it's
00343 * as likely to be due to incorrect username as incorrect password.
00344 *
00345 * If @a may_save is FALSE, the auth system does not allow the credentials
00346 * to be saved (to disk). A prompt function shall not ask the user if the
00347 * credentials shall be saved if @a may_save is FALSE. For example, a GUI
00348 * client with a remember password checkbox would grey out the checkbox if
00349 * @a may_save is FALSE.
00350 */
00351 typedef svn_error_t *
00352 (*svn_auth_simple_prompt_func_t) (svn_auth_cred_simple_t **cred,
00353 void *baton,
00354 const char *realm,
00355 const char *username,
00356 svn_boolean_t may_save,
00357 apr_pool_t *pool);
00358
00359
00360 /** Set @a *cred by prompting the user, allocating @a *cred in @a pool.
00361 * @a baton is an implementation-specific closure.
00362 *
00363 * If @a realm is non-null, maybe use it in the prompt string.
00364 *
00365 * If @a may_save is FALSE, the auth system does not allow the credentials
00366 * to be saved (to disk). A prompt function shall not ask the user if the
00367 * credentials shall be saved if @a may_save is FALSE. For example, a GUI
00368 * client with a remember username checkbox would grey out the checkbox if
00369 * @a may_save is FALSE.
00370 */
00371 typedef svn_error_t *
00372 (*svn_auth_username_prompt_func_t) (svn_auth_cred_username_t **cred,
00373 void *baton,
00374 const char *realm,
00375 svn_boolean_t may_save,
00376 apr_pool_t *pool);
00377
00378
00379 /** @name SSL server certificate failure bits
00380 *
00381 * @note These values are stored in the on disk auth cache by the SSL
00382 * server certificate auth provider, so the meaning of these bits must
00383 * not be changed.
00384 * @{
00385 */
00386 /** Certificate is not yet valid. */
00387 #define SVN_AUTH_SSL_NOTYETVALID 0x00000001
00388 /** Certificate has expired. */
00389 #define SVN_AUTH_SSL_EXPIRED 0x00000002
00390 /** Certificate's CN (hostname) does not match the remote hostname. */
00391 #define SVN_AUTH_SSL_CNMISMATCH 0x00000004
00392 /** @brief Certificate authority is unknown (i.e. not trusted) */
00393 #define SVN_AUTH_SSL_UNKNOWNCA 0x00000008
00394 /** @brief Other failure. This can happen if neon has introduced a new
00395 * failure bit that we do not handle yet. */
00396 #define SVN_AUTH_SSL_OTHER 0x40000000
00397 /** @} */
00398
00399 /** Set @a *cred by prompting the user, allocating @a *cred in @a pool.
00400 * @a baton is an implementation-specific closure.
00401 *
00402 * @a cert_info is a structure describing the server cert that was
00403 * presented to the client, and @a failures is a bitmask that
00404 * describes exactly why the cert could not be automatically validated,
00405 * composed from the constants SVN_AUTH_SSL_* (@c SVN_AUTH_SSL_NOTYETVALID
00406 * etc.). @a realm is a string that can be used in the prompt string.
00407 *
00408 * If @a may_save is FALSE, the auth system does not allow the credentials
00409 * to be saved (to disk). A prompt function shall not ask the user if the
00410 * credentials shall be saved if @a may_save is FALSE. For example, a GUI
00411 * client with a trust permanently checkbox would grey out the checkbox if
00412 * @a may_save is FALSE.
00413 */
00414 typedef svn_error_t *(*svn_auth_ssl_server_trust_prompt_func_t) (
00415 svn_auth_cred_ssl_server_trust_t **cred,
00416 void *baton,
00417 const char *realm,
00418 apr_uint32_t failures,
00419 const svn_auth_ssl_server_cert_info_t *cert_info,
00420 svn_boolean_t may_save,
00421 apr_pool_t *pool);
00422
00423
00424 /** Set @a *cred by prompting the user, allocating @a *cred in @a pool.
00425 * @a baton is an implementation-specific closure. @a realm is a string
00426 * that can be used in the prompt string.
00427 *
00428 * If @a may_save is FALSE, the auth system does not allow the credentials
00429 * to be saved (to disk). A prompt function shall not ask the user if the
00430 * credentials shall be saved if @a may_save is FALSE. For example, a GUI
00431 * client with a remember certificate checkbox would grey out the checkbox
00432 * if @a may_save is FALSE.
00433 */
00434 typedef svn_error_t *(*svn_auth_ssl_client_cert_prompt_func_t) (
00435 svn_auth_cred_ssl_client_cert_t **cred,
00436 void *baton,
00437 const char *realm,
00438 svn_boolean_t may_save,
00439 apr_pool_t *pool);
00440
00441
00442 /** Set @a *cred by prompting the user, allocating @a *cred in @a pool.
00443 * @a baton is an implementation-specific closure. @a realm is a string
00444 * identifying the certificate, and can be used in the prompt string.
00445 *
00446 * If @a may_save is FALSE, the auth system does not allow the credentials
00447 * to be saved (to disk). A prompt function shall not ask the user if the
00448 * credentials shall be saved if @a may_save is FALSE. For example, a GUI
00449 * client with a remember password checkbox would grey out the checkbox if
00450 * @a may_save is FALSE.
00451 */
00452 typedef svn_error_t *(*svn_auth_ssl_client_cert_pw_prompt_func_t) (
00453 svn_auth_cred_ssl_client_cert_pw_t **cred,
00454 void *baton,
00455 const char *realm,
00456 svn_boolean_t may_save,
00457 apr_pool_t *pool);
00458
00459
00460
00461 /** Initialize an authentication system.
00462 *
00463 * Return an authentication object in @a *auth_baton (allocated in @a
00464 * pool) that represents a particular instance of the svn
00465 * authentication system. @a providers is an array of @c
00466 * svn_auth_provider_object_t pointers, already allocated in @a pool
00467 * and intentionally ordered. These pointers will be stored within @a
00468 * *auth_baton, grouped by credential type, and searched in this exact
00469 * order.
00470 */
00471 void svn_auth_open(svn_auth_baton_t **auth_baton,
00472 apr_array_header_t *providers,
00473 apr_pool_t *pool);
00474
00475 /** Set an authentication run-time parameter.
00476 *
00477 * Store @a name / @a value pair as a run-time parameter in @a
00478 * auth_baton, making the data accessible to all providers. @a name
00479 * and @a value will be NOT be duplicated into the auth_baton's
00480 * pool. To delete a run-time parameter, pass NULL for @a value.
00481 */
00482 void svn_auth_set_parameter(svn_auth_baton_t *auth_baton,
00483 const char *name,
00484 const void *value);
00485
00486 /** Get an authentication run-time parameter.
00487 *
00488 * Return a value for run-time parameter @a name from @a auth_baton.
00489 * Return NULL if the parameter doesn't exist.
00490 */
00491 const void * svn_auth_get_parameter(svn_auth_baton_t *auth_baton,
00492 const char *name);
00493
00494 /** Universal run-time parameters, made available to all providers.
00495
00496 If you are writing a new provider, then to be a "good citizen",
00497 you should notice these global parameters! Note that these
00498 run-time params should be treated as read-only by providers; the
00499 application is responsible for placing them into the auth_baton
00500 hash. */
00501
00502 /** The auth-hash prefix indicating that the parameter is global. */
00503 #define SVN_AUTH_PARAM_PREFIX "svn:auth:"
00504
00505 /**
00506 * @name Default credentials defines
00507 * Any 'default' credentials that came in through the application itself,
00508 * (e.g. --username and --password options). Property values are
00509 * const char *.
00510 * @{ */
00511 #define SVN_AUTH_PARAM_DEFAULT_USERNAME SVN_AUTH_PARAM_PREFIX "username"
00512 #define SVN_AUTH_PARAM_DEFAULT_PASSWORD SVN_AUTH_PARAM_PREFIX "password"
00513 /** @} */
00514
00515 /** @brief The application doesn't want any providers to prompt
00516 * users. Property value is irrelevant; only property's existence
00517 * matters. */
00518 #define SVN_AUTH_PARAM_NON_INTERACTIVE SVN_AUTH_PARAM_PREFIX "non-interactive"
00519
00520 /** @brief The application doesn't want any providers to save passwords
00521 * to disk. Property value is irrelevant; only property's existence
00522 * matters. */
00523 #define SVN_AUTH_PARAM_DONT_STORE_PASSWORDS SVN_AUTH_PARAM_PREFIX \
00524 "dont-store-passwords"
00525
00526 /** @brief The application doesn't want any providers to save credentials
00527 * to disk. Property value is irrelevant; only property's existence
00528 * matters. */
00529 #define SVN_AUTH_PARAM_NO_AUTH_CACHE SVN_AUTH_PARAM_PREFIX "no-auth-cache"
00530
00531 /** @brief The following property is for SSL server cert providers. This
00532 * provides a pointer to an @c apr_uint32_t containing the failures
00533 * detected by the certificate validator. */
00534 #define SVN_AUTH_PARAM_SSL_SERVER_FAILURES SVN_AUTH_PARAM_PREFIX \
00535 "ssl:failures"
00536
00537 /** @brief The following property is for SSL server cert providers. This
00538 * provides the cert info (svn_auth_ssl_server_cert_info_t). */
00539 #define SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO SVN_AUTH_PARAM_PREFIX \
00540 "ssl:cert-info"
00541
00542 /** Some providers need access to the @c svn_config_t configuration. */
00543 #define SVN_AUTH_PARAM_CONFIG SVN_AUTH_PARAM_PREFIX "config"
00544
00545 /** The current server group. */
00546 #define SVN_AUTH_PARAM_SERVER_GROUP SVN_AUTH_PARAM_PREFIX "server-group"
00547
00548 /** @brief A configuration directory that overrides the default
00549 * ~/.subversion. */
00550 #define SVN_AUTH_PARAM_CONFIG_DIR SVN_AUTH_PARAM_PREFIX "config-dir"
00551
00552
00553 /** Get an initial set of credentials.
00554 *
00555 * Ask @a auth_baton to set @a *credentials to a set of credentials
00556 * defined by @a cred_kind and valid within @a realmstring, or NULL if
00557 * no credentials are available. Otherwise, return an iteration state
00558 * in @a *state, so that the caller can call
00559 * svn_auth_next_credentials(), in case the first set of credentials
00560 * fails to authenticate.
00561 *
00562 * Use @a pool to allocate @a *state, and for temporary allocation.
00563 * Note that @a *credentials will be allocated in @a auth_baton's pool.
00564 */
00565 svn_error_t * svn_auth_first_credentials(void **credentials,
00566 svn_auth_iterstate_t **state,
00567 const char *cred_kind,
00568 const char *realmstring,
00569 svn_auth_baton_t *auth_baton,
00570 apr_pool_t *pool);
00571
00572 /** Get another set of credentials, assuming previous ones failed to
00573 * authenticate.
00574 *
00575 * Use @a state to fetch a different set of @a *credentials, as a
00576 * follow-up to svn_auth_first_credentials() or
00577 * svn_auth_next_credentials(). If no more credentials are available,
00578 * set @a *credentials to NULL.
00579 *
00580 * Note that @a *credentials will be allocated in @c auth_baton's pool.
00581 */
00582 svn_error_t * svn_auth_next_credentials(void **credentials,
00583 svn_auth_iterstate_t *state,
00584 apr_pool_t *pool);
00585
00586 /** Save a set of credentials.
00587 *
00588 * Ask @a state to store the most recently returned credentials,
00589 * presumably because they successfully authenticated. Use @a pool
00590 * for temporary allocation. If no credentials were ever returned, do
00591 * nothing.
00592 */
00593 svn_error_t * svn_auth_save_credentials(svn_auth_iterstate_t *state,
00594 apr_pool_t *pool);
00595
00596 /** @} */
00597
00598 #ifdef __cplusplus
00599 }
00600 #endif /* __cplusplus */
00601
00602 #endif /* SVN_AUTH_H */
1.2.14 written by Dimitri van Heesch,
© 1997-2002