File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
google/auth/compute_engine Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,9 @@ def refresh(self, request):
124
124
scopes = self ._scopes if self ._scopes is not None else self ._default_scopes
125
125
try :
126
126
self ._retrieve_info (request )
127
+ # Always fetch token with default service account email.
127
128
self .token , self .expiry = _metadata .get_service_account_token (
128
- request , service_account = self . _service_account_email , scopes = scopes
129
+ request , service_account = "default" , scopes = scopes
129
130
)
130
131
except exceptions .TransportError as caught_exc :
131
132
new_exc = exceptions .RefreshError (caught_exc )
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ def test_with_target_audience_integration(self):
501
501
responses .add (
502
502
responses .GET ,
503
503
"http://metadata.google.internal/computeMetadata/v1/instance/"
504
- "service-accounts/service-account@example.com /token" ,
504
+ "service-accounts/default /token" ,
505
505
status = 200 ,
506
506
content_type = "application/json" ,
507
507
json = {
@@ -659,7 +659,7 @@ def test_with_quota_project_integration(self):
659
659
responses .add (
660
660
responses .GET ,
661
661
"http://metadata.google.internal/computeMetadata/v1/instance/"
662
- "service-accounts/service-account@example.com /token" ,
662
+ "service-accounts/default /token" ,
663
663
status = 200 ,
664
664
content_type = "application/json" ,
665
665
json = {
You can’t perform that action at this time.
0 commit comments