From 9c05cb79e9404f481090ec3fb4ad8c07bb70f863 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 31 Dec 2024 11:21:33 -0600 Subject: Allow the request to redirect from HTTP to HTTPS where relevant. --- gn_auth/auth/authentication/oauth2/models/oauth2client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gn_auth/auth/authentication/oauth2/models') 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) -- cgit v1.2.3