skyplatform-iam 1.2.2__tar.gz → 1.2.4__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.
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/PKG-INFO +2 -1
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/pyproject.toml +3 -2
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/skyplatform_iam/__init__.py +1 -1
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/skyplatform_iam/connect_agenterra_iam.py +4 -3
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/skyplatform_iam/middleware.py +4 -3
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/README.md +0 -0
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/skyplatform_iam/config.py +0 -0
- {skyplatform_iam-1.2.2 → skyplatform_iam-1.2.4}/skyplatform_iam/exceptions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skyplatform-iam
|
|
3
|
-
Version: 1.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
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "skyplatform-iam"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="x9", email="xuanxienanxunmobao@gmail.com" },
|
|
10
10
|
]
|
|
@@ -35,6 +35,7 @@ dependencies = [
|
|
|
35
35
|
"pydantic>=1.8.0",
|
|
36
36
|
"requests>=2.25.0",
|
|
37
37
|
"starlette>=0.14.0",
|
|
38
|
+
"pyjwt>=2.10.1"
|
|
38
39
|
]
|
|
39
40
|
|
|
40
41
|
[project.optional-dependencies]
|
|
@@ -114,4 +115,4 @@ python_files = ["test_*.py"]
|
|
|
114
115
|
python_classes = ["Test*"]
|
|
115
116
|
python_functions = ["test_*"]
|
|
116
117
|
addopts = "-v --tb=short"
|
|
117
|
-
asyncio_mode = "auto"
|
|
118
|
+
asyncio_mode = "auto"
|
|
@@ -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
|
-
|
|
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,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|