Skip to content

Commit 7e51a70

Browse files
Endpoints: decode jwt string (#2225)
1 parent 4005a71 commit 7e51a70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

endpoints/getting-started/clients/google-jwt-client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def generate_jwt(sa_keyfile,
6464
def make_jwt_request(signed_jwt, url='https://your-endpoint.com'):
6565
"""Makes an authorized request to the endpoint"""
6666
headers = {
67-
'Authorization': 'Bearer {}'.format(signed_jwt),
67+
'Authorization': 'Bearer {}'.format(signed_jwt.decode('utf-8')),
6868
'content-type': 'application/json'
6969
}
7070
response = requests.get(url, headers=headers)

0 commit comments

Comments
 (0)