Skip to content

Commit

Permalink
fix: signBytes for impersonated credentials (#506)
Browse files Browse the repository at this point in the history
* fix: signBytes doesn't work for impersonated credentials

Fixes #338

* black
  • Loading branch information
maroux authored May 15, 2020
1 parent 9dc9e9f commit ca8d98a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion google/auth/impersonated_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ def sign_bytes(self, message):

iam_sign_endpoint = _IAM_SIGN_ENDPOINT.format(self._target_principal)

body = {"payload": base64.b64encode(message), "delegates": self._delegates}
body = {
"payload": base64.b64encode(message).decode("utf-8"),
"delegates": self._delegates,
}

headers = {"Content-Type": "application/json"}

Expand Down

0 comments on commit ca8d98a

Please # to comment.