You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wwuck
changed the title
JWT auth error in bookstore_client.py under python3
JWT auth error in jwt_token_gen.py and bookstore_client.py under python3
Jul 21, 2020
Uh oh!
There was an error while loading. Please reload this page.
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/bookstore-grpc/jwt_token_gen.py
Did you change the file? If so, how?
Yes, updated to run
.decode('utf-8')
on thesigned_jwt
before it is printed tostdout
.Describe the issue
Running the sample from https://cloud.google.com/endpoints/docs/grpc/service-account-authentication, and also reading the documentation at https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/endpoints/bookstore-grpc/README.md#generating-a-jwt-token-from-a-service-account-file. They state that the output from
jwt_token_gen.py
can be used directly as input into
bookstore_client.py --auth_token
.This works fine for python2 but is broken in python3 as the output of
jwt_token_gen.py
now wraps the token withb'<token>'
under python3.There was a similar bug report for another sample client file at #1958.
The text was updated successfully, but these errors were encountered: