huace-aigc-auth-client 1.1.12__py3-none-any.whl → 1.1.14__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 +10 -3
- {huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/METADATA +1 -1
- huace_aigc_auth_client-1.1.14.dist-info/RECORD +10 -0
- huace_aigc_auth_client-1.1.12.dist-info/RECORD +0 -10
- {huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/WHEEL +0 -0
- {huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/licenses/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
|
|
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,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
huace_aigc_auth_client/__init__.py,sha256=MVQTxSYcO0m__crdn_wjyLMaMH38e-GleNAa6fOdHRs,4540
|
|
2
|
+
huace_aigc_auth_client/legacy_adapter.py,sha256=YmgMM2BJ39BKj3SYAuUOejQvKQz1qS-MtwUDNkNow_Q,23798
|
|
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.14.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
+
huace_aigc_auth_client-1.1.14.dist-info/METADATA,sha256=21vHFMGE4WYtAjKfRF_7kbjxFBs3gVAV6g7y5wMrUrQ,22971
|
|
8
|
+
huace_aigc_auth_client-1.1.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
huace_aigc_auth_client-1.1.14.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
+
huace_aigc_auth_client-1.1.14.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
huace_aigc_auth_client/__init__.py,sha256=alKZbosXaypCFR2O3uyS8-2i-KDb2i8im9BKcyTTaE4,4540
|
|
2
|
-
huace_aigc_auth_client/legacy_adapter.py,sha256=1YRfa71IP-LkUxMoFB5uFhloikXIl3ZE01fQ_CXppBs,23455
|
|
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.12.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
-
huace_aigc_auth_client-1.1.12.dist-info/METADATA,sha256=qknk0q-tOmAYEdTCLOBRHvRZZwa-qEtpTPhfVkgO4N8,22971
|
|
8
|
-
huace_aigc_auth_client-1.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
huace_aigc_auth_client-1.1.12.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
-
huace_aigc_auth_client-1.1.12.dist-info/RECORD,,
|
|
File without changes
|
{huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{huace_aigc_auth_client-1.1.12.dist-info → huace_aigc_auth_client-1.1.14.dist-info}/top_level.txt
RENAMED
|
File without changes
|