skyplatform-iam 1.2.2__py3-none-any.whl → 1.2.4__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.2"
20
+ __version__ = "1.2.4"
21
21
  __author__ = "x9"
22
22
  __description__ = "SkyPlatform IAM认证SDK,提供FastAPI中间件和IAM服务连接功能"
23
23
 
@@ -838,12 +838,13 @@ class ConnectAgenterraIam(object):
838
838
  "access_key": self.access_key,
839
839
  "machine_token": self.machine_token,
840
840
  "user_id": user_id,
841
- "config_name": config_name
841
+ "config_name": config_name,
842
+ "config_value": config_value
842
843
  }
843
844
 
844
845
  # 添加可选参数
845
- if config_value is not None:
846
- body["config_value"] = config_value
846
+ # if config_value is not None:
847
+ # body["config_value"] = config_value
847
848
 
848
849
  uri = "/api/v2/service/add_custom_config"
849
850
  url = self.agenterra_iam_host + uri
@@ -68,6 +68,10 @@ class AuthMiddleware(BaseHTTPMiddleware):
68
68
  api_path = request.url.path
69
69
  method = request.method
70
70
 
71
+ if method == "OPTIONS":
72
+ response = await call_next(request)
73
+ return response
74
+
71
75
  # 检查是否为机机接口鉴权 来自其他服务
72
76
  server_ak = request.headers.get('SERVER-AK')
73
77
  server_sk = request.headers.get('SERVER-SK')
@@ -338,9 +342,6 @@ class AuthService:
338
342
  all_credentials = credentials_list
339
343
  total_credentials = len(credentials_list)
340
344
 
341
- if not username:
342
- return None
343
-
344
345
  # 构建用户信息字典
345
346
  user_info = {
346
347
  "id": iam_user_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skyplatform-iam
3
- Version: 1.2.2
3
+ Version: 1.2.4
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/
@@ -27,6 +27,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
27
  Requires-Python: >=3.9
28
28
  Requires-Dist: fastapi>=0.68.0
29
29
  Requires-Dist: pydantic>=1.8.0
30
+ Requires-Dist: pyjwt>=2.10.1
30
31
  Requires-Dist: requests>=2.25.0
31
32
  Requires-Dist: starlette>=0.14.0
32
33
  Provides-Extra: dev
@@ -0,0 +1,8 @@
1
+ skyplatform_iam/__init__.py,sha256=XwFr1dn6ywlk5ayELT1fnoXOMmGkG7ZxQsoTu0c-JwA,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=iTrog2D6PgLE4LVnNr2h6s39bX7ybnG5BnAWaQpqI0Y,17927
6
+ skyplatform_iam-1.2.4.dist-info/METADATA,sha256=PKoPzhhIbBBfFYsmme79wado1zTpOlroTGwbibQrkMA,12687
7
+ skyplatform_iam-1.2.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
8
+ skyplatform_iam-1.2.4.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=LlgK5yDUK-gQrXd18AaeZekh-gmbzWLt9YrFLXy7CqY,5591
2
- skyplatform_iam/config.py,sha256=x3GBikMkC8-0og0Vhs6h5_nTcBXeEd8euDgVDd7IsK4,4607
3
- skyplatform_iam/connect_agenterra_iam.py,sha256=a4d9XYHDIYhT2d8OeM4gF_OXeT53nYRd0qb8sYHmc8k,42281
4
- skyplatform_iam/exceptions.py,sha256=Rt55QIzVK1F_kn6yzKQKKakD6PZDFdPLCGaCphKKms8,2166
5
- skyplatform_iam/middleware.py,sha256=jXX8_UciUhOkbK418anqtJoclNhvTQeFnguwPjv5K9E,17863
6
- skyplatform_iam-1.2.2.dist-info/METADATA,sha256=nBBnXZ5v7jDLnjdBi53sTB4PNo0nsK5kSZlH4Ngw3RM,12658
7
- skyplatform_iam-1.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- skyplatform_iam-1.2.2.dist-info/RECORD,,