Implement OpenID Connect-based login (#7256)

This commit is contained in:
Quentin Gliech 2020-05-08 14:30:40 +02:00 committed by GitHub
parent a4a5ec4096
commit 616af44137
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 2163 additions and 12 deletions

View file

@ -359,6 +359,7 @@ class SimpleHttpClient(object):
actual_headers = {
b"Content-Type": [b"application/x-www-form-urlencoded"],
b"User-Agent": [self.user_agent],
b"Accept": [b"application/json"],
}
if headers:
actual_headers.update(headers)
@ -399,6 +400,7 @@ class SimpleHttpClient(object):
actual_headers = {
b"Content-Type": [b"application/json"],
b"User-Agent": [self.user_agent],
b"Accept": [b"application/json"],
}
if headers:
actual_headers.update(headers)
@ -434,6 +436,10 @@ class SimpleHttpClient(object):
ValueError: if the response was not JSON
"""
actual_headers = {b"Accept": [b"application/json"]}
if headers:
actual_headers.update(headers)
body = yield self.get_raw(uri, args, headers=headers)
return json.loads(body)
@ -467,6 +473,7 @@ class SimpleHttpClient(object):
actual_headers = {
b"Content-Type": [b"application/json"],
b"User-Agent": [self.user_agent],
b"Accept": [b"application/json"],
}
if headers:
actual_headers.update(headers)