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.
@@ -168,4 +168,4 @@ __all__ = [
168
168
  # Logger 设置
169
169
  "setLogger",
170
170
  ]
171
- __version__ = "1.1.13"
171
+ __version__ = "1.1.15"
@@ -276,7 +276,13 @@ class LegacySystemAdapter(ABC):
276
276
 
277
277
  for user in users:
278
278
  try:
279
- result = await self.sync_user_to_auth(user)
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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: huace-aigc-auth-client
3
- Version: 1.1.13
3
+ Version: 1.1.15
4
4
  Summary: 华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能
5
5
  Author-email: Huace <support@huace.com>
6
6
  License: MIT
@@ -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,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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,,