Commit e9aa8479 by Patrick Steinhardt

examples: support plain username credentials

Implement plain username credential types. These type of
credentials might be asked for e.g. as some kind of
pre-authentication step, before the actual credentials are
passed.
parent 635ec366
......@@ -362,6 +362,11 @@ int cred_acquire_cb(git_cred **out,
goto out;
error = git_cred_userpass_plaintext_new(out, username, password);
} else if (allowed_types & GIT_CREDTYPE_USERNAME) {
if ((error = ask(&username, "Username:")) < 0)
goto out;
error = git_cred_username_new(out, username);
}
out:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment