backout sign change

This commit is contained in:
Jay Lee
2023-04-05 18:48:47 +00:00
parent 76f9a144ac
commit a88320b1b2
3 changed files with 1 additions and 8 deletions

View File

@@ -7962,17 +7962,13 @@ def create_signjwt_serviceaccount():
'key_type': 'signjwt',
'token_uri': 'https://oauth2.googleapis.com/token'
}
print(1)
request = transport.create_request()
print(2)
try:
creds, sa_info['project_id'] = google.auth.default(scopes=['https://www.googleapis.com/auth/iam'],
request=request)
except google.auth.exceptions.DefaultCredentialsError as e:
controlflow.system_error_exit(2, e)
print(3)
creds.refresh(request)
print(4)
sa_info['client_email'] = creds.service_account_email
oa2 = buildGAPIObjectNoAuthentication('oauth2')
token_info = gapi.call(oa2, 'tokeninfo', access_token=creds.token)

View File

@@ -73,10 +73,8 @@ class SignJwt(google.auth.crypt.Signer):
def sign(self, message):
''' Call IAM Credentials SignJWT API to get our signed JWT '''
request = transport.create_request()
try:
credentials, _ = google.auth.default(scopes=['https://www.googleapis.com/auth/iam'],
request=request)
credentials, _ = google.auth.default(scopes=['https://www.googleapis.com/auth/iam'])
except google.auth.exceptions.DefaultCredentialsError as e:
controlflow.system_error_exit(2, e)
httpObj = transport.AuthorizedHttp(

View File

@@ -31,7 +31,6 @@ install_requires =
google-auth-oauthlib >= 0.4.6
google-auth >= 2.3.3
httplib2 >= 0.20.2
importlib.metadata; python_version < '3.8'
passlib >= 1.7.4
pathvalidate
python-dateutil