huace-aigc-auth-client 1.1.5__tar.gz → 1.1.6__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.5/huace_aigc_auth_client.egg-info → huace_aigc_auth_client-1.1.6}/PKG-INFO +1 -1
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client/__init__.py +1 -1
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client/legacy_adapter.py +5 -2
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6/huace_aigc_auth_client.egg-info}/PKG-INFO +1 -1
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/pyproject.toml +1 -1
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/MANIFEST.in +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/QUICK_START.txt +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/README.md +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client/sdk.py +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client/webhook.py +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client.egg-info/SOURCES.txt +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client.egg-info/dependency_links.txt +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client.egg-info/requires.txt +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client.egg-info/top_level.txt +0 -0
- {huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/setup.cfg +0 -0
|
@@ -195,14 +195,14 @@ class LegacySystemAdapter(ABC):
|
|
|
195
195
|
"""
|
|
196
196
|
raise NotImplementedError("Subclass must implement get_all_users_async method")
|
|
197
197
|
|
|
198
|
-
async def upsert_user_async(self, user_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
198
|
+
async def upsert_user_async(self, user_data: Dict[str, Any], auth_data: Dict[str, Any] = None) -> Dict[str, Any]:
|
|
199
199
|
"""异步创建或更新用户(存在则更新,不存在则新增)
|
|
200
200
|
|
|
201
201
|
这是一个默认实现,子类可以选择性覆盖以优化性能。
|
|
202
202
|
|
|
203
203
|
Args:
|
|
204
204
|
user_data: 用户数据字典(必须包含 username)
|
|
205
|
-
|
|
205
|
+
auth_data: 鉴权系统用户数据字典(可选)
|
|
206
206
|
Returns:
|
|
207
207
|
Dict: 操作结果 {"created": bool, "user_id": Any}
|
|
208
208
|
"""
|
|
@@ -215,6 +215,9 @@ class LegacySystemAdapter(ABC):
|
|
|
215
215
|
|
|
216
216
|
if existing:
|
|
217
217
|
# 用户存在,执行更新
|
|
218
|
+
if not auth_data or auth_data.get("updatedFields") is None or len(auth_data.get("updatedFields")) == 0:
|
|
219
|
+
# 如果没有提供 auth_data 或 updatedFields,则不更新
|
|
220
|
+
return {"created": False, "user_id": existing.get("id")}
|
|
218
221
|
await self._update_user_async(username, user_data)
|
|
219
222
|
return {"created": False, "user_id": existing.get("id")}
|
|
220
223
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huace_aigc_auth_client-1.1.5 → huace_aigc_auth_client-1.1.6}/huace_aigc_auth_client/webhook.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|