skyplatform-iam 1.2.1__tar.gz → 1.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skyplatform-iam
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: SkyPlatform IAM认证SDK,提供FastAPI中间件和认证路由
5
5
  Project-URL: Homepage, https://github.com/xinmayoujiang12621/agenterra_iam
6
6
  Project-URL: Documentation, https://skyplatform-iam.readthedocs.io/
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "skyplatform-iam"
7
- version = "1.2.1"
7
+ version = "1.2.2"
8
8
  authors = [
9
9
  { name="x9", email="xuanxienanxunmobao@gmail.com" },
10
10
  ]
@@ -17,7 +17,7 @@ from .exceptions import (
17
17
  NetworkError
18
18
  )
19
19
 
20
- __version__ = "1.2.1"
20
+ __version__ = "1.2.2"
21
21
  __author__ = "x9"
22
22
  __description__ = "SkyPlatform IAM认证SDK,提供FastAPI中间件和IAM服务连接功能"
23
23
 
@@ -708,6 +708,11 @@ class ConnectAgenterraIam(object):
708
708
 
709
709
  if response.status_code == 200:
710
710
  self.logger.info(f"[{method_name}] 令牌刷新成功")
711
+ data = response.json()["data"]
712
+ access_token = data["access_token"]
713
+ payload = decode_jwt_token(access_token)
714
+ self.machine_token = payload["machine_access_token"]
715
+
711
716
  return response
712
717
  else:
713
718
  self.logger.warning(f"[{method_name}] 令牌刷新失败 - 状态码: {response.status_code}")