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

bug 1564442: Raise if an error occured getting a token. #956

Merged
merged 2 commits into from
Jul 9, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions client/balrogclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def _get_auth0_token(secrets, session):
payload = dict(client_id=secrets["client_id"], client_secret=secrets["client_secret"], audience=secrets["audience"], grant_type="client_credentials")
headers = {"Content-Type": "application/json"}
request = session.post(url, data=json.dumps(payload), headers=headers)
request.raise_for_status()
response = request.json()
# In order to know exact expiration we would need to decode the token, what
# requires more dependencies. Instead we use the returned "expires_in" in
Expand Down
2 changes: 1 addition & 1 deletion client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="balrogclient",
version="0.5.0",
version="0.6.0",
description="Balrog Admin API Client",
author="Mozilla Release Engineers",
author_email="release+python@mozilla.com",
Expand Down