diff options
author | Patrick Steinhardt <ps@pks.im> | 2020-01-30 10:40:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 10:40:44 +0100 |
commit | aa4cd778b97d7271aa0ad12a4f9d492c443d5935 (patch) | |
tree | da7cc7d3a92f8e1c06e47876b574fc86cbd73eaf /include/git2/cred_helpers.h | |
parent | f9b41a6600f35f36ba5381f355355c303bd05df1 (diff) | |
parent | 3f54ba8b61869f42b2bbd1a60091a0be640bc8fc (diff) | |
download | libgit2-aa4cd778b97d7271aa0ad12a4f9d492c443d5935.tar.gz |
Merge pull request #5336 from libgit2/ethomson/credtype
cred: change enum to git_credential_t and GIT_CREDENTIAL_*
Diffstat (limited to 'include/git2/cred_helpers.h')
-rw-r--r-- | include/git2/cred_helpers.h | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/include/git2/cred_helpers.h b/include/git2/cred_helpers.h index 1416d5642..3721b6d8a 100644 --- a/include/git2/cred_helpers.h +++ b/include/git2/cred_helpers.h @@ -7,47 +7,9 @@ #ifndef INCLUDE_git_cred_helpers_h__ #define INCLUDE_git_cred_helpers_h__ -#include "transport.h" - -/** - * @file git2/cred_helpers.h - * @brief Utility functions for credential management - * @defgroup git_cred_helpers credential management helpers - * @ingroup Git - * @{ - */ -GIT_BEGIN_DECL - -/** - * Payload for git_cred_stock_userpass_plaintext. - */ -typedef struct git_cred_userpass_payload { - const char *username; - const char *password; -} git_cred_userpass_payload; - - -/** - * Stock callback usable as a git_cred_acquire_cb. This calls - * git_cred_userpass_plaintext_new unless the protocol has not specified - * `GIT_CREDTYPE_USERPASS_PLAINTEXT` as an allowed type. - * - * @param cred The newly created credential object. - * @param url The resource for which we are demanding a credential. - * @param user_from_url The username that was embedded in a "user\@host" - * remote url, or NULL if not included. - * @param allowed_types A bitmask stating which cred types are OK to return. - * @param payload The payload provided when specifying this callback. (This is - * interpreted as a `git_cred_userpass_payload*`.) - */ -GIT_EXTERN(int) git_cred_userpass( - git_cred **cred, - const char *url, - const char *user_from_url, - unsigned int allowed_types, - void *payload); - +/* These declarations have moved. */ +#ifndef GIT_DEPRECATE_HARD +# include "git2/credential_helpers.h" +#endif -/** @} */ -GIT_END_DECL #endif |