Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:10 +0300
committerJunio C Hamano <gitster@pobox.com>2023-03-18 00:03:10 +0300
commit92c56da09683fa3331668adec073b6769da8f0b7 (patch)
treeb114e12cbf97692ce1e07af74616d8b38cda0408 /credential.h
parentaf5388d2ddb0bc7c22fbe698078f4ca07879d954 (diff)
parent5f2117b24f568ecc789c677748d70ccd538b16ba (diff)
Merge branch 'mc/credential-helper-www-authenticate'
Allow information carried on the WWW-AUthenticate header to be passed to the credential helpers. * mc/credential-helper-www-authenticate: credential: add WWW-Authenticate header to cred requests http: read HTTP WWW-Authenticate response headers t5563: add tests for basic and anoymous HTTP access
Diffstat (limited to 'credential.h')
-rw-r--r--credential.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/credential.h b/credential.h
index 935b28a70f..2b5958cd43 100644
--- a/credential.h
+++ b/credential.h
@@ -2,6 +2,7 @@
#define CREDENTIAL_H
#include "string-list.h"
+#include "strvec.h"
/**
* The credentials API provides an abstracted way of gathering username and
@@ -115,6 +116,20 @@ struct credential {
*/
struct string_list helpers;
+ /**
+ * A `strvec` of WWW-Authenticate header values. Each string
+ * is the value of a WWW-Authenticate header in an HTTP response,
+ * in the order they were received in the response.
+ */
+ struct strvec wwwauth_headers;
+
+ /**
+ * Internal use only. Keeps track of if we previously matched against a
+ * WWW-Authenticate header line in order to re-fold future continuation
+ * lines into one value.
+ */
+ unsigned header_is_last_match:1;
+
unsigned approved:1,
configured:1,
quit:1,
@@ -132,6 +147,7 @@ struct credential {
#define CREDENTIAL_INIT { \
.helpers = STRING_LIST_INIT_DUP, \
.password_expiry_utc = TIME_MAX, \
+ .wwwauth_headers = STRVEC_INIT, \
}
/* Initialize a credential structure, setting all fields to empty. */