Skip to content

Commit 768b628

Browse files
committed
test changes
1 parent 92e8b96 commit 768b628

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

example.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# example for getting the default credentials
2+
import google.auth
3+
import google.auth.transport.requests
4+
5+
cred, project = google.auth.default(scopes=["email"]) # create an object, but it doesn't token yet
6+
7+
print(cred)
8+
print(project)
9+
10+
req = google.auth.transport.requests.Request() # create a http object for http calls
11+
cred.refresh(req) # call refresh to fetch a token
12+
13+
print(cred.token)
14+
print(cred.expiry)

google/auth/compute_engine/credentials.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def _retrieve_info(self, request):
100100
request, service_account=self._service_account_email
101101
)
102102

103+
import pdb; pdb.set_trace()
103104
# Don't override scopes requested by the user.
104105
if self._scopes is None:
105106
self._scopes = info["scopes"]

0 commit comments

Comments
 (0)