diff options
| author | Ben Straub <bs@github.com> | 2013-01-08 12:58:20 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-01-09 13:31:17 -0800 |
| commit | ffb02b1630da85e063a816cc6dddcdc004a8ff72 (patch) | |
| tree | f8660cf4d0c99b7185b1428edc777c6f573b9041 /include/git2/transport.h | |
| parent | 252b24049cf7018ba80c736fda636c53c465fbd2 (diff) | |
| download | libgit2-ffb02b1630da85e063a816cc6dddcdc004a8ff72.tar.gz | |
Expose stock user/pass credential utility
Diffstat (limited to 'include/git2/transport.h')
| -rw-r--r-- | include/git2/transport.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h index fba5fb920..f03e9fc87 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -68,6 +68,26 @@ typedef int (*git_cred_acquire_cb)( unsigned int allowed_types, void *payload); +/** + * Payload for git_cred_stock_userpass_plaintext. + */ +typedef struct git_cred_stock_userpass_plaintext_payload { + char *username; + char *password; +} git_cred_stock_userpass_plaintext_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. + */ +GIT_EXTERN(int) git_cred_stock_userpass_plaintext( + git_cred **cred, + const char *url, + unsigned int allowed_types, + void *payload); + /* *** End interface for credentials acquisition *** *** Begin base transport interface *** |
