huace-aigc-auth-client 1.1.14__py3-none-any.whl → 1.1.16__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.14"
171
+ __version__ = "1.1.16"
@@ -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"):
@@ -291,7 +297,8 @@ class LegacySystemAdapter(ABC):
291
297
  "error": result.get("message")
292
298
  })
293
299
  except Exception as e:
294
- logger.error(f"Error syncing user {user.get('username')}: {e}")
300
+ import traceback
301
+ logger.error(f"Error syncing user {user.get('username')}: {e}\n{traceback.format_exc()}")
295
302
  results["failed"] += 1
296
303
  results["errors"].append({
297
304
  "user": user.get("username"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: huace-aigc-auth-client
3
- Version: 1.1.14
3
+ Version: 1.1.16
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=ELgO1fH3WO7-IP1OGgad_yPqIhG_B8-nQvbfFu7jJ5I,4540
2
+ huace_aigc_auth_client/legacy_adapter.py,sha256=Zgti8lxR2kKeTSFfj66YfiY_TQtJL1B4pkXatG2g0sg,24108
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.16.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
7
+ huace_aigc_auth_client-1.1.16.dist-info/METADATA,sha256=rf6V5upXh-D-qeVfcNqjB5cF8M21f9DKHDOulLmJeLE,22971
8
+ huace_aigc_auth_client-1.1.16.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
9
+ huace_aigc_auth_client-1.1.16.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
10
+ huace_aigc_auth_client-1.1.16.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=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,,