Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make jwk_data get respect ssl_verify=no #161

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion globus_sdk/auth/token_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def decode_id_token(self, auth_client):
logger.debug('Fetch JWK Data: Start')
oidc_conf = auth_client.get('/.well-known/openid-configuration')
jwks_uri = oidc_conf['jwks_uri']
jwk_data = requests.get(jwks_uri).json()
# use the auth_client's decision on ssl_verify=yes/no
jwk_data = requests.get(jwks_uri, verify=auth_client._verify).json()
logger.debug('Fetch JWK Data: Complete')

return jwt.decode(
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_token_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def setUp(self):
# mock AuthClient
self.ac = mock.Mock()
self.ac.client_id = get_client_data()["native_app_client1"]["id"]
self.ac._verify = True
self.ac.get = mock.Mock(return_value={
"jwks_uri":
u"https://auth.globus.org/jwk.json"})
Expand Down