Skip to content

Commit

Permalink
Make jwk_data get respect ssl_verify=no
Browse files Browse the repository at this point in the history
Take the value off of the given AuthClient object.
Closes #160
  • Loading branch information
sirosen committed Mar 23, 2017
1 parent 09049c1 commit 22b2347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 22b2347

Please sign in to comment.