Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #110 from axelsteingrimsson/add_email_scope_to_gcp…
Browse files Browse the repository at this point in the history
…_credentials_refresh

Add email scope to GCP provided credential refresh
  • Loading branch information
k8s-ci-robot committed Apr 8, 2019
2 parents 5c03b3b + 1637d56 commit 1d5231c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ def __init__(self, config_dict, active_context=None,
self._config_persister = config_persister

def _refresh_credentials():
credentials, project_id = google.auth.default(
scopes=['https://www.googleapis.com/auth/cloud-platform']
)
credentials, project_id = google.auth.default(scopes=[
'https://www.googleapis.com/auth/cloud-platform',
'https://www.googleapis.com/auth/userinfo.email'
])
request = google.auth.transport.requests.Request()
credentials.refresh(request)
return credentials
Expand Down

0 comments on commit 1d5231c

Please sign in to comment.