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.
- {huace_aigc_auth_client-1.1.2/huace_aigc_auth_client.egg-info → huace_aigc_auth_client-1.1.3}/PKG-INFO +1 -1
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/__init__.py +1 -1
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/legacy_adapter.py +16 -1
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3/huace_aigc_auth_client.egg-info}/PKG-INFO +1 -1
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/pyproject.toml +1 -1
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/MANIFEST.in +0 -0
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/QUICK_START.txt +0 -0
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/README.md +0 -0
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client/sdk.py +0 -0
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/SOURCES.txt +0 -0
- {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
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/huace_aigc_auth_client.egg-info/requires.txt +0 -0
- {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
- {huace_aigc_auth_client-1.1.2 → huace_aigc_auth_client-1.1.3}/setup.cfg +0 -0
|
@@ -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
|
-
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|