Skip to content

Commit

Permalink
Adding issuer (GoogleCloudPlatform#2266)
Browse files Browse the repository at this point in the history
* Adding issuer
* Update make_iap_request.py
  • Loading branch information
Abby Carey authored and gguuss committed Jul 19, 2019
1 parent 729efa6 commit 210b7b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iap/make_iap_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def make_iap_request(url, client_id, method='GET', **kwargs):
# Set the default timeout, if missing
if 'timeout' not in kwargs:
kwargs['timeout'] = 90

# Figure out what environment we're running in and get some preliminary
# information about the service account.
bootstrap_credentials, _ = google.auth.default(
Expand Down
1 change: 1 addition & 0 deletions iap/validate_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def _validate_iap_jwt(iap_jwt, expected_audience):
decoded_jwt = jwt.decode(
iap_jwt, key,
algorithms=['ES256'],
issuer='https://cloud.google.com/iap',
audience=expected_audience)
return (decoded_jwt['sub'], decoded_jwt['email'], '')
except (jwt.exceptions.InvalidTokenError,
Expand Down

0 comments on commit 210b7b2

Please sign in to comment.