mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +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):
|
def sign(self, message):
|
||||||
''' Call IAM Credentials SignJWT API to get our signed JWT '''
|
''' Call IAM Credentials SignJWT API to get our signed JWT '''
|
||||||
|
request = transport.create_request()
|
||||||
try:
|
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:
|
except google.auth.exceptions.DefaultCredentialsError as e:
|
||||||
controlflow.system_error_exit(2, e)
|
controlflow.system_error_exit(2, e)
|
||||||
httpObj = transport.AuthorizedHttp(
|
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_TLS_MIN_VERSION
|
||||||
from gam.var import GC_Values
|
from gam.var import GC_Values
|
||||||
|
|
||||||
|
# Bump default retries
|
||||||
|
httplib2.RETRIES = 5
|
||||||
|
|
||||||
def create_http(cache=None,
|
def create_http(cache=None,
|
||||||
timeout=None,
|
timeout=None,
|
||||||
|
|||||||
Reference in New Issue
Block a user