tencentcloud-sdk-python-common 3.0.1442__py2.py3-none-any.whl → 3.0.1444__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tencentcloud-sdk-python-common might be problematic. Click here for more details.
- tencentcloud/__init__.py +1 -1
- tencentcloud/common/credential.py +20 -2
- {tencentcloud_sdk_python_common-3.0.1442.dist-info → tencentcloud_sdk_python_common-3.0.1444.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python_common-3.0.1442.dist-info → tencentcloud_sdk_python_common-3.0.1444.dist-info}/RECORD +6 -6
- {tencentcloud_sdk_python_common-3.0.1442.dist-info → tencentcloud_sdk_python_common-3.0.1444.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_common-3.0.1442.dist-info → tencentcloud_sdk_python_common-3.0.1444.dist-info}/top_level.txt +0 -0
tencentcloud/__init__.py
CHANGED
|
@@ -388,14 +388,17 @@ class OIDCRoleArnCredential(object):
|
|
|
388
388
|
_service = "sts"
|
|
389
389
|
_action = 'AssumeRoleWithWebIdentity'
|
|
390
390
|
_default_session_name = 'tencentcloud-python-sdk-'
|
|
391
|
+
_endpoint = "sts.tencentcloudapi.com"
|
|
391
392
|
|
|
392
|
-
def __init__(self, region, provider_id, web_identity_token, role_arn, role_session_name, duration_seconds=7200):
|
|
393
|
+
def __init__(self, region, provider_id, web_identity_token, role_arn, role_session_name, duration_seconds=7200, endpoint=None):
|
|
393
394
|
self._region = region
|
|
394
395
|
self._provider_id = provider_id
|
|
395
396
|
self._web_identity_token = web_identity_token
|
|
396
397
|
self._role_arn = role_arn
|
|
397
398
|
self._role_session_name = role_session_name
|
|
398
399
|
self._duration_seconds = duration_seconds
|
|
400
|
+
if endpoint:
|
|
401
|
+
self._endpoint = endpoint
|
|
399
402
|
|
|
400
403
|
self._token = None
|
|
401
404
|
self._tmp_secret_id = None
|
|
@@ -428,6 +431,14 @@ class OIDCRoleArnCredential(object):
|
|
|
428
431
|
self._keep_fresh()
|
|
429
432
|
return self._token
|
|
430
433
|
|
|
434
|
+
@property
|
|
435
|
+
def endpoint(self):
|
|
436
|
+
return self._endpoint
|
|
437
|
+
|
|
438
|
+
@endpoint.setter
|
|
439
|
+
def endpoint(self, endpoint):
|
|
440
|
+
self._endpoint = endpoint
|
|
441
|
+
|
|
431
442
|
def _keep_fresh(self):
|
|
432
443
|
if None in [self._token, self._tmp_secret_key, self._tmp_secret_id] or self._expired_time < int(time.time()):
|
|
433
444
|
self.refresh()
|
|
@@ -435,7 +446,14 @@ class OIDCRoleArnCredential(object):
|
|
|
435
446
|
def refresh(self):
|
|
436
447
|
if self._is_tke:
|
|
437
448
|
self._init_from_tke()
|
|
438
|
-
|
|
449
|
+
|
|
450
|
+
http_profile = HttpProfile()
|
|
451
|
+
http_profile.endpoint = self._endpoint
|
|
452
|
+
client_profile = ClientProfile()
|
|
453
|
+
client_profile.httpProfile = http_profile
|
|
454
|
+
|
|
455
|
+
common_client = CommonClient(credential=None, region=self._region, version=self._version,
|
|
456
|
+
service=self._service, profile=client_profile)
|
|
439
457
|
params = {
|
|
440
458
|
"ProviderId": self._provider_id,
|
|
441
459
|
"WebIdentityToken": self._web_identity_token,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
tencentcloud/__init__.py,sha256=
|
|
1
|
+
tencentcloud/__init__.py,sha256=z7pegdPMkssddojtfv7Ov_NQWpfty7HFI6vrZw_JgMU,631
|
|
2
2
|
tencentcloud/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
tencentcloud/common/abstract_client.py,sha256=xJM9-JThhLv5_pnnqMie_RqZkSjnn_mVkaiy9phVLT0,25499
|
|
4
4
|
tencentcloud/common/abstract_model.py,sha256=LJ9BkK1Djh_gdx3Cy3trEOtJRGtrM-ikeqRzO1PgwiY,2418
|
|
5
5
|
tencentcloud/common/circuit_breaker.py,sha256=p_6ssklMRtR-YKNGcFLd3ClUvZPs8ZLnVkhjcOZA0DY,4301
|
|
6
6
|
tencentcloud/common/common_client.py,sha256=1Dr96VCEoJgDPmnurI46ko_cSROtRQbcHef_qeOKZco,2043
|
|
7
|
-
tencentcloud/common/credential.py,sha256=
|
|
7
|
+
tencentcloud/common/credential.py,sha256=2O_omcrUV7GWunIBAB4KdLrB_doTmQsZ-5qxsVoHehI,17085
|
|
8
8
|
tencentcloud/common/retry.py,sha256=4h6lG2KEVezhnfZt1BvSkftNupuu98g-n1g1EKu62IE,2323
|
|
9
9
|
tencentcloud/common/sign.py,sha256=Mm51G6huhhT91yayB-KKWCQFIuy59dFzdSwolNfSuwM,1568
|
|
10
10
|
tencentcloud/common/exception/__init__.py,sha256=xK4vqaAlCWY5pGTDaz21vzIO6izEBESCNDeBNvojqYo,735
|
|
@@ -15,7 +15,7 @@ tencentcloud/common/http/request.py,sha256=Qgo3BI4cbbEv1Y2EvlB8KQSh1brvPKRypSdfn
|
|
|
15
15
|
tencentcloud/common/profile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
tencentcloud/common/profile/client_profile.py,sha256=gvqlN4orPjQKA7kfZw0GMLuwXkKnSMgLo2S-6Mq3qh0,5221
|
|
17
17
|
tencentcloud/common/profile/http_profile.py,sha256=4or_nmNoy-Yd9MWpxxPhvbaeaAjx3ZYTNgTl6nt6ETU,2256
|
|
18
|
-
tencentcloud_sdk_python_common-3.0.
|
|
19
|
-
tencentcloud_sdk_python_common-3.0.
|
|
20
|
-
tencentcloud_sdk_python_common-3.0.
|
|
21
|
-
tencentcloud_sdk_python_common-3.0.
|
|
18
|
+
tencentcloud_sdk_python_common-3.0.1444.dist-info/METADATA,sha256=ZAEu_Xi9tn3nQjghHpwFVhf8juApqKCf8j8s6Ej9chU,1487
|
|
19
|
+
tencentcloud_sdk_python_common-3.0.1444.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
20
|
+
tencentcloud_sdk_python_common-3.0.1444.dist-info/top_level.txt,sha256=g-8OyzoqI6O6LiS85zkeNzhB-osEnRIPZMdyRd_0eL0,13
|
|
21
|
+
tencentcloud_sdk_python_common-3.0.1444.dist-info/RECORD,,
|
|
File without changes
|