mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
use transport and bump retries
This commit is contained in:
@@ -73,8 +73,10 @@ 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')
|
||||
credentials, _ = 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)
|
||||
httpObj = transport.AuthorizedHttp(
|
||||
|
||||
@@ -9,6 +9,8 @@ from gam.var import GC_TLS_MAX_VERSION
|
||||
from gam.var import GC_TLS_MIN_VERSION
|
||||
from gam.var import GC_Values
|
||||
|
||||
# Bump default retries
|
||||
httplib2.RETRIES = 5
|
||||
|
||||
def create_http(cache=None,
|
||||
timeout=None,
|
||||
|
||||
Reference in New Issue
Block a user