diff options
author | Ben Straub <bs@github.com> | 2013-01-31 10:44:57 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-01-31 10:44:57 -0800 |
commit | 7602cb7c0ea0d69efd30640af234be20393bf57c (patch) | |
tree | 35fb50d5a1e118990f3f1f11b670371febae537c /include | |
parent | 2234b2b03153c03fc6d502dd61ae55e659be4b8b (diff) | |
download | libgit2-7602cb7c0ea0d69efd30640af234be20393bf57c.tar.gz |
Add user-from-url param to auth callback
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/cred_helpers.h | 3 | ||||
-rw-r--r-- | include/git2/transport.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/cred_helpers.h b/include/git2/cred_helpers.h index 7c213c8dd..e3eb91d6c 100644 --- a/include/git2/cred_helpers.h +++ b/include/git2/cred_helpers.h @@ -34,6 +34,8 @@ typedef struct git_cred_userpass_payload { * * @param cred The newly created credential object. * @param url The resource for which we are demanding a credential. + * @param username_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*`.) @@ -41,6 +43,7 @@ typedef struct 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); diff --git a/include/git2/transport.h b/include/git2/transport.h index 4945ff151..469b43f72 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -62,6 +62,8 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new( * * @param cred The newly created credential object. * @param url The resource for which we are demanding a credential. + * @param username_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. * @return 0 for success or an error code for failure @@ -69,6 +71,7 @@ GIT_EXTERN(int) git_cred_userpass_plaintext_new( typedef int (*git_cred_acquire_cb)( git_cred **cred, const char *url, + const char *username_from_url, unsigned int allowed_types, void *payload); |