aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authentication/oauth2/models
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-31 11:21:33 -0600
committerFrederick Muriuki Muriithi2024-12-31 11:21:33 -0600
commit9c05cb79e9404f481090ec3fb4ad8c07bb70f863 (patch)
tree4e6b5ac555faf9811c2dbf77cba5649fc59b770f /gn_auth/auth/authentication/oauth2/models
parent96e4790eb6f453b16b87e1b763c2a966ac95f77d (diff)
downloadgn-auth-9c05cb79e9404f481090ec3fb4ad8c07bb70f863.tar.gz
Allow the request to redirect from HTTP to HTTPS where relevant.
Diffstat (limited to 'gn_auth/auth/authentication/oauth2/models')
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2client.py b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
index d39f0c6..79b6e53 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2client.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
@@ -72,7 +72,9 @@ class OAuth2Client(ClientMixin):
## single-threaded mode, i.e. can only serve one request
## at a time.
return KeySet([JsonWebKey.import_key(key)
- for key in requests.get(jwksuri).json()["jwks"]])
+ for key in requests.get(
+ jwksuri,
+ allow_redirects=True).json()["jwks"]])
except requests.ConnectionError as _connerr:
logging.debug(
"Could not connect to provided URI: %s", jwksuri, exc_info=True)