skyplatform-iam 1.2.1__py3-none-any.whl → 1.2.3__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.
@@ -17,7 +17,7 @@ from .exceptions import (
17
17
  NetworkError
18
18
  )
19
19
 
20
- __version__ = "1.2.1"
20
+ __version__ = "1.2.3"
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}")
@@ -833,12 +838,13 @@ class ConnectAgenterraIam(object):
833
838
  "access_key": self.access_key,
834
839
  "machine_token": self.machine_token,
835
840
  "user_id": user_id,
836
- "config_name": config_name
841
+ "config_name": config_name,
842
+ "config_value": config_value
837
843
  }
838
844
 
839
845
  # 添加可选参数
840
- if config_value is not None:
841
- body["config_value"] = config_value
846
+ # if config_value is not None:
847
+ # body["config_value"] = config_value
842
848
 
843
849
  uri = "/api/v2/service/add_custom_config"
844
850
  url = self.agenterra_iam_host + uri
@@ -338,9 +338,6 @@ class AuthService:
338
338
  all_credentials = credentials_list
339
339
  total_credentials = len(credentials_list)
340
340
 
341
- if not username:
342
- return None
343
-
344
341
  # 构建用户信息字典
345
342
  user_info = {
346
343
  "id": iam_user_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skyplatform-iam
3
- Version: 1.2.1
3
+ Version: 1.2.3
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/
@@ -0,0 +1,8 @@
1
+ skyplatform_iam/__init__.py,sha256=vXaJjjXRcFeKo_f4lFHlaGmlXUrefSeubARysfm4oiU,5591
2
+ skyplatform_iam/config.py,sha256=x3GBikMkC8-0og0Vhs6h5_nTcBXeEd8euDgVDd7IsK4,4607
3
+ skyplatform_iam/connect_agenterra_iam.py,sha256=qbtzxdwbHBQM6LSiD7HqC-AK7FOpic-SMVjX4VpHkeU,42332
4
+ skyplatform_iam/exceptions.py,sha256=Rt55QIzVK1F_kn6yzKQKKakD6PZDFdPLCGaCphKKms8,2166
5
+ skyplatform_iam/middleware.py,sha256=niLad2BhE1gyZ2y8yAp1-oiomqSh1gL6hEhtN0IsiPo,17802
6
+ skyplatform_iam-1.2.3.dist-info/METADATA,sha256=odQCTOkP1IYgtjmMiZtxXEizE1hP1P5BVv2bEc9hhxM,12658
7
+ skyplatform_iam-1.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
+ skyplatform_iam-1.2.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,8 +0,0 @@
1
- skyplatform_iam/__init__.py,sha256=6ffSGMRItbBPnxgQMaoeB1oGLfXuMK3HHrspuiqyO8s,5591
2
- skyplatform_iam/config.py,sha256=x3GBikMkC8-0og0Vhs6h5_nTcBXeEd8euDgVDd7IsK4,4607
3
- skyplatform_iam/connect_agenterra_iam.py,sha256=t03IdWCwBP1oOF1WBTSZETB4MUKQ7zTmfvc6zXD83fg,42050
4
- skyplatform_iam/exceptions.py,sha256=Rt55QIzVK1F_kn6yzKQKKakD6PZDFdPLCGaCphKKms8,2166
5
- skyplatform_iam/middleware.py,sha256=jXX8_UciUhOkbK418anqtJoclNhvTQeFnguwPjv5K9E,17863
6
- skyplatform_iam-1.2.1.dist-info/METADATA,sha256=HLkBft7Qp6w9NFpsHtkVJWFXLcHNZDJ_7_AaXYprZ6E,12658
7
- skyplatform_iam-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- skyplatform_iam-1.2.1.dist-info/RECORD,,