Skip to content

Commit dc5aa6d

Browse files
authored
fix: signBytes for impersonated credentials (#506)
* fix: signBytes doesn't work for impersonated credentials Fixes #338 * black
1 parent 4c55ce6 commit dc5aa6d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/google-auth/google/auth/impersonated_credentials.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ def sign_bytes(self, message):
264264

265265
iam_sign_endpoint = _IAM_SIGN_ENDPOINT.format(self._target_principal)
266266

267-
body = {"payload": base64.b64encode(message), "delegates": self._delegates}
267+
body = {
268+
"payload": base64.b64encode(message).decode("utf-8"),
269+
"delegates": self._delegates,
270+
}
268271

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

0 commit comments

Comments
 (0)