huace-aigc-auth-client 1.1.13__py3-none-any.whl → 1.1.15__py3-none-any.whl
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/__init__.py +1 -1
- huace_aigc_auth_client/legacy_adapter.py +9 -3
- {huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/METADATA +1 -1
- huace_aigc_auth_client-1.1.15.dist-info/RECORD +10 -0
- {huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/WHEEL +1 -1
- huace_aigc_auth_client-1.1.13.dist-info/RECORD +0 -10
- {huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/licenses/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/top_level.txt +0 -0
|
@@ -276,7 +276,13 @@ class LegacySystemAdapter(ABC):
|
|
|
276
276
|
|
|
277
277
|
for user in users:
|
|
278
278
|
try:
|
|
279
|
-
|
|
279
|
+
# 将 dict 转换为 LegacyUserData 对象
|
|
280
|
+
if isinstance(user, dict):
|
|
281
|
+
legacy_user = LegacyUserData(data=user)
|
|
282
|
+
else:
|
|
283
|
+
legacy_user = user
|
|
284
|
+
|
|
285
|
+
result = await self.sync_user_to_auth(legacy_user)
|
|
280
286
|
logger.info(f"Sync result for user {user.get('username')}: {result}")
|
|
281
287
|
|
|
282
288
|
if result.get("success"):
|
|
@@ -331,7 +337,7 @@ class LegacySystemAdapter(ABC):
|
|
|
331
337
|
|
|
332
338
|
# 创建或更新用户
|
|
333
339
|
logger.info(f"Handling {event} event for user: {legacy_data}")
|
|
334
|
-
result = await self.upsert_user_async(legacy_data)
|
|
340
|
+
result = await self.upsert_user_async(legacy_data, data)
|
|
335
341
|
|
|
336
342
|
return {
|
|
337
343
|
"success": True,
|
|
@@ -561,7 +567,7 @@ class UserSyncService:
|
|
|
561
567
|
legacy_data["password"] = password
|
|
562
568
|
|
|
563
569
|
# 使用 upsert 方法(存在则更新,不存在则创建)
|
|
564
|
-
result = await self.adapter.upsert_user_async(legacy_data)
|
|
570
|
+
result = await self.adapter.upsert_user_async(legacy_data, auth_data)
|
|
565
571
|
|
|
566
572
|
return {
|
|
567
573
|
"success": True,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
huace_aigc_auth_client/__init__.py,sha256=KYoil3pbho69Cs0nEPJz2Bli1L8tJ9NjDDBCOU9vWT0,4540
|
|
2
|
+
huace_aigc_auth_client/legacy_adapter.py,sha256=f1_xH6huiPdCnJx1ko-2_kWTHjWKLBK2zyPXqnPiEaY,24049
|
|
3
|
+
huace_aigc_auth_client/sdk.py,sha256=ypClZfQm4Ux4db8XDP51I5Cuk1Uc9F2VPgECpXXphkQ,23272
|
|
4
|
+
huace_aigc_auth_client/webhook.py,sha256=XQZYEbMoqIdqZWCGSTcedeDKJpDbUVSq5g08g-6Qucg,4124
|
|
5
|
+
huace_aigc_auth_client/webhook_flask.py,sha256=Iosu4dBtRhQZM_ytn-bn82MpVsyOiV28FBnt7Tfh31U,7225
|
|
6
|
+
huace_aigc_auth_client-1.1.15.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
+
huace_aigc_auth_client-1.1.15.dist-info/METADATA,sha256=lUBiUG93imjVSuLQBO4GVUZY-DW5xE8xvWwObY5KrGM,22971
|
|
8
|
+
huace_aigc_auth_client-1.1.15.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
9
|
+
huace_aigc_auth_client-1.1.15.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
+
huace_aigc_auth_client-1.1.15.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
huace_aigc_auth_client/__init__.py,sha256=Pjau66hZz0MeL7WWf-G4nGWkjw-4UazjSy2f8n5jdGM,4540
|
|
2
|
-
huace_aigc_auth_client/legacy_adapter.py,sha256=t-1QekRecn0B_gQ5r-ksX0hhuqUTBB2lvIUiNT4SowI,23781
|
|
3
|
-
huace_aigc_auth_client/sdk.py,sha256=ypClZfQm4Ux4db8XDP51I5Cuk1Uc9F2VPgECpXXphkQ,23272
|
|
4
|
-
huace_aigc_auth_client/webhook.py,sha256=XQZYEbMoqIdqZWCGSTcedeDKJpDbUVSq5g08g-6Qucg,4124
|
|
5
|
-
huace_aigc_auth_client/webhook_flask.py,sha256=Iosu4dBtRhQZM_ytn-bn82MpVsyOiV28FBnt7Tfh31U,7225
|
|
6
|
-
huace_aigc_auth_client-1.1.13.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
-
huace_aigc_auth_client-1.1.13.dist-info/METADATA,sha256=XspgJA5ZklRRqN7zRy37eXffkcWINrLMT31mmVtEzmo,22971
|
|
8
|
-
huace_aigc_auth_client-1.1.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
huace_aigc_auth_client-1.1.13.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
-
huace_aigc_auth_client-1.1.13.dist-info/RECORD,,
|
{huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{huace_aigc_auth_client-1.1.13.dist-info → huace_aigc_auth_client-1.1.15.dist-info}/top_level.txt
RENAMED
|
File without changes
|