File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
appengine/standard/flask/hello_world Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 18
18
from flask import Flask
19
19
20
20
import google .auth
21
+ import google .auth .app_engine
21
22
import google .auth .transport .requests
22
23
from google .oauth2 import service_account
23
24
import google .oauth2 ._client
33
34
34
35
35
36
def 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' ,
38
43
additional_claims = {
39
- 'target_audience' : 'https ://msachs-staging.appspot.com '
44
+ 'target_audience' : 'http ://meep '
40
45
})
41
46
42
47
grant_assertion = credentials ._make_authorization_grant_assertion ()
You can’t perform that action at this time.
0 commit comments