diff options
author | arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> | 2021-11-01 13:10:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 13:10:17 -0700 |
commit | ef3128474431b07d1d519209ea61622bc245ce91 (patch) | |
tree | a4f1dc1948343cf3695d248e973aa2eecad3413c /google | |
parent | bd0ccc5fe77d55f7a19f5278d6b60587c393ee3c (diff) | |
download | google-auth-library-python-ef3128474431b07d1d519209ea61622bc245ce91.tar.gz |
fix: fix error in sign_bytes (#905)
* fix: fix error in sign_bytes
* fix test
Diffstat (limited to 'google')
-rw-r--r-- | google/auth/impersonated_credentials.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/google/auth/impersonated_credentials.py b/google/auth/impersonated_credentials.py index b8a6c49..80d6fdf 100644 --- a/google/auth/impersonated_credentials.py +++ b/google/auth/impersonated_credentials.py @@ -290,6 +290,11 @@ class Credentials(credentials.CredentialsWithQuotaProject, credentials.Signing): url=iam_sign_endpoint, headers=headers, json=body ) + if response.status_code != http_client.OK: + raise exceptions.TransportError( + "Error calling sign_bytes: {}".format(response.json()) + ) + return base64.b64decode(response.json()["signedBlob"]) @property |