summaryrefslogtreecommitdiffstats
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorMatthew John Cheetham <mjcheetham@outlook.com>2023-02-27 18:20:20 +0100
committerJunio C Hamano <gitster@pobox.com>2023-02-27 19:40:40 +0100
commit5f2117b24f568ecc789c677748d70ccd538b16ba (patch)
tree46d33f1ad5a426299b6274f4e258428913592be5 /t/lib-httpd
parenthttp: read HTTP WWW-Authenticate response headers (diff)
downloadgit-5f2117b24f568ecc789c677748d70ccd538b16ba.tar.xz
git-5f2117b24f568ecc789c677748d70ccd538b16ba.zip
credential: add WWW-Authenticate header to cred requests
Add the value of the WWW-Authenticate response header to credential requests. Credential helpers that understand and support HTTP authentication and authorization can use this standard header (RFC 2616 Section 14.47 [1]) to generate valid credentials. WWW-Authenticate headers can contain information pertaining to the authority, authentication mechanism, or extra parameters/scopes that are required. The current I/O format for credential helpers only allows for unique names for properties/attributes, so in order to transmit multiple header values (with a specific order) we introduce a new convention whereby a C-style array syntax is used in the property name to denote multiple ordered values for the same property. In this case we send multiple `wwwauth[]` properties where the order that the repeated attributes appear in the conversation reflects the order that the WWW-Authenticate headers appeared in the HTTP response. Add a set of tests to exercise the HTTP authentication header parsing and the interop with credential helpers. Credential helpers will receive WWW-Authenticate information in credential requests. [1] https://datatracker.ietf.org/doc/html/rfc2616#section-14.47 Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd')
0 files changed, 0 insertions, 0 deletions