Merge branch 'bc/credential-scheme-enhancement'
The credential helper protocol, together with the HTTP layer, have been enhanced to support authentication schemes different from username & password pair, like Bearer and NTLM. * bc/credential-scheme-enhancement: credential: add method for querying capabilities credential-cache: implement authtype capability t: add credential tests for authtype credential: add support for multistage credential rounds t5563: refactor for multi-stage authentication docs: set a limit on credential line length credential: enable state capability credential: add an argument to keep state http: add support for authtype and credential docs: indicate new credential protocol fields credential: add a field called "ephemeral" credential: gate new fields on capability credential: add a field for pre-encoded credentials http: use new headers for each object request remote-curl: reset headers on new request credential: add an authtype field
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "builtin.h"
|
||||
#include "credential.h"
|
||||
#include "gettext.h"
|
||||
#include "parse-options.h"
|
||||
#include "path.h"
|
||||
@ -127,6 +128,13 @@ static char *get_socket_path(void)
|
||||
return socket;
|
||||
}
|
||||
|
||||
static void announce_capabilities(void)
|
||||
{
|
||||
struct credential c = CREDENTIAL_INIT;
|
||||
c.capa_authtype.request_initial = 1;
|
||||
credential_announce_capabilities(&c, stdout);
|
||||
}
|
||||
|
||||
int cmd_credential_cache(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
char *socket_path = NULL;
|
||||
@ -163,6 +171,8 @@ int cmd_credential_cache(int argc, const char **argv, const char *prefix)
|
||||
do_cache(socket_path, op, timeout, FLAG_RELAY);
|
||||
else if (!strcmp(op, "store"))
|
||||
do_cache(socket_path, op, timeout, FLAG_RELAY|FLAG_SPAWN);
|
||||
else if (!strcmp(op, "capability"))
|
||||
announce_capabilities();
|
||||
else
|
||||
; /* ignore unknown operation */
|
||||
|
||||
|
Reference in New Issue
Block a user