File tree Expand file tree Collapse file tree
appengine/standard/flask/hello_world Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from flask import Flask
1919
2020import google .auth
21+ import google .auth .app_engine
2122import google .auth .transport .requests
2223from google .oauth2 import service_account
2324import google .oauth2 ._client
3334
3435
3536def get_open_id_connect_id_token ():
36- credentials = service_account .Credentials .from_service_account_file (
37- 'service-account.json' ,
37+ bootstrap_credentials = google .auth .app_engine .Credentials ()
38+ signer = google .auth .app_engine .Signer ()
39+ credentials = service_account .Credentials (
40+ signer ,
41+ bootstrap_credentials .service_account_email ,
42+ token_uri = 'https://www.googleapis.com/oauth2/v4/token' ,
3843 additional_claims = {
39- 'target_audience' : 'https ://msachs-staging.appspot.com '
44+ 'target_audience' : 'http ://meep '
4045 })
4146
4247 grant_assertion = credentials ._make_authorization_grant_assertion ()
You can’t perform that action at this time.
0 commit comments