huace-aigc-auth-client 1.1.2__tar.gz → 1.1.3__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 (15) hide show
  1. {huace_aigc_auth_client-1.1.2/huace_aigc_auth_client.egg-info → huace_aigc_auth_client-1.1.3}/PKG-INFO +1 -1
  2. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/__init__.py +1 -1
  3. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/legacy_adapter.py +16 -1
  4. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3/huace_aigc_auth_client.egg-info}/PKG-INFO +1 -1
  5. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/pyproject.toml +1 -1
  6. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/LICENSE +0 -0
  7. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/MANIFEST.in +0 -0
  8. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/QUICK_START.txt +0 -0
  9. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/README.md +0 -0
  10. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/sdk.py +0 -0
  11. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/SOURCES.txt +0 -0
  12. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/dependency_links.txt +0 -0
  13. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/requires.txt +0 -0
  14. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/top_level.txt +0 -0
  15. {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/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.2
3
+ Version: 1.1.3
4
4
  Summary: 华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能
5
5
  Author-email: Huace <support@huace.com>
6
6
  License: MIT
@@ -90,4 +90,4 @@ __all__ = [
90
90
  "create_sync_config",
91
91
  "create_default_field_mappings",
92
92
  ]
93
- __version__ = "1.1.2"
93
+ __version__ = "1.1.3"
@@ -174,6 +174,18 @@ class LegacySystemAdapter(ABC):
174
174
  """
175
175
  raise NotImplementedError("Subclass must implement _update_user_async method")
176
176
 
177
+ @abstractmethod
178
+ async def _delete_user_async(self, username: str) -> bool:
179
+ """异步删除用户(子类必须实现)
180
+
181
+ Args:
182
+ username: 用户名
183
+
184
+ Returns:
185
+ bool: 删除成功返回 True
186
+ """
187
+ raise NotImplementedError("Subclass must implement _delete_user_async method")
188
+
177
189
  @abstractmethod
178
190
  async def get_all_users_async(self) -> List[LegacyUserData]:
179
191
  """获取所有用户(子类必须实现,用于批量同步)
@@ -308,7 +320,10 @@ class LegacySystemAdapter(ABC):
308
320
  elif event == "user.deleted":
309
321
  # 禁用用户而不是删除
310
322
  username = data.get("username")
311
- await self._update_user_async(username, {"status": "disabled"})
323
+ if not username:
324
+ logger.error("username is required for user.deleted event")
325
+ return {"success": False, "message": "username is required for user.deleted event"}
326
+ await self._delete_user_async(username)
312
327
 
313
328
  return {"success": True, "message": "User disabled"}
314
329
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: huace-aigc-auth-client
3
- Version: 1.1.2
3
+ Version: 1.1.3
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.2"
7
+ version = "1.1.3"
8
8
  description = "华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"