huace-aigc-auth-client 1.1.12__tar.gz → 1.1.14__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.
Files changed (17) hide show
  1. {huace_aigc_auth_client-1.1.12/huace_aigc_auth_client.egg-info → huace_aigc_auth_client-1.1.14}/PKG-INFO +1 -1
  2. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client/__init__.py +1 -1
  3. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client/legacy_adapter.py +10 -3
  4. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14/huace_aigc_auth_client.egg-info}/PKG-INFO +1 -1
  5. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/pyproject.toml +1 -1
  6. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/LICENSE +0 -0
  7. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/MANIFEST.in +0 -0
  8. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/QUICK_START.txt +0 -0
  9. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/README.md +0 -0
  10. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client/sdk.py +0 -0
  11. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client/webhook.py +0 -0
  12. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client/webhook_flask.py +0 -0
  13. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client.egg-info/SOURCES.txt +0 -0
  14. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client.egg-info/dependency_links.txt +0 -0
  15. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client.egg-info/requires.txt +0 -0
  16. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/huace_aigc_auth_client.egg-info/top_level.txt +0 -0
  17. {huace_aigc_auth_client-1.1.12 → huace_aigc_auth_client-1.1.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: huace-aigc-auth-client
3
- Version: 1.1.12
3
+ Version: 1.1.14
4
4
  Summary: 华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能
5
5
  Author-email: Huace <support@huace.com>
6
6
  License: MIT
@@ -168,4 +168,4 @@ __all__ = [
168
168
  # Logger 设置
169
169
  "setLogger",
170
170
  ]
171
- __version__ = "1.1.12"
171
+ __version__ = "1.1.14"
@@ -331,7 +331,7 @@ class LegacySystemAdapter(ABC):
331
331
 
332
332
  # 创建或更新用户
333
333
  logger.info(f"Handling {event} event for user: {legacy_data}")
334
- result = await self.upsert_user_async(legacy_data)
334
+ result = await self.upsert_user_async(legacy_data, data)
335
335
 
336
336
  return {
337
337
  "success": True,
@@ -422,7 +422,14 @@ class LegacySystemAdapter(ABC):
422
422
  return (self.config.unified_password, False)
423
423
  elif self.config.password_mode == PasswordMode.CUSTOM_MAPPING:
424
424
  if self.config.password_mapper and legacy_user:
425
- password = self.config.password_mapper(legacy_user.data)
425
+ # 兼容 dict 和 LegacyUserData 两种类型
426
+ if isinstance(legacy_user, dict):
427
+ user_data = legacy_user
428
+ elif isinstance(legacy_user, LegacyUserData):
429
+ user_data = legacy_user.data
430
+ else:
431
+ user_data = legacy_user
432
+ password = self.config.password_mapper(user_data)
426
433
  return (password, self.config.password_is_hashed)
427
434
  return (self.config.unified_password, False)
428
435
  return (self.config.unified_password, False)
@@ -554,7 +561,7 @@ class UserSyncService:
554
561
  legacy_data["password"] = password
555
562
 
556
563
  # 使用 upsert 方法(存在则更新,不存在则创建)
557
- result = await self.adapter.upsert_user_async(legacy_data)
564
+ result = await self.adapter.upsert_user_async(legacy_data, auth_data)
558
565
 
559
566
  return {
560
567
  "success": True,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: huace-aigc-auth-client
3
- Version: 1.1.12
3
+ Version: 1.1.14
4
4
  Summary: 华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能
5
5
  Author-email: Huace <support@huace.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "huace-aigc-auth-client"
7
- version = "1.1.12"
7
+ version = "1.1.14"
8
8
  description = "华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"