huace-aigc-auth-client 1.1.15__py3-none-any.whl → 1.1.17__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 +2 -1
- huace_aigc_auth_client/sdk.py +2 -3
- {huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/METADATA +5 -5
- huace_aigc_auth_client-1.1.17.dist-info/RECORD +10 -0
- huace_aigc_auth_client-1.1.15.dist-info/RECORD +0 -10
- {huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/WHEEL +0 -0
- {huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/licenses/LICENSE +0 -0
- {huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/top_level.txt +0 -0
|
@@ -297,7 +297,8 @@ class LegacySystemAdapter(ABC):
|
|
|
297
297
|
"error": result.get("message")
|
|
298
298
|
})
|
|
299
299
|
except Exception as e:
|
|
300
|
-
|
|
300
|
+
import traceback
|
|
301
|
+
logger.error(f"Error syncing user {user.get('username')}: {e}\n{traceback.format_exc()}")
|
|
301
302
|
results["failed"] += 1
|
|
302
303
|
results["errors"].append({
|
|
303
304
|
"user": user.get("username"),
|
huace_aigc_auth_client/sdk.py
CHANGED
|
@@ -95,7 +95,7 @@ class AigcAuthClient:
|
|
|
95
95
|
client = AigcAuthClient(
|
|
96
96
|
app_id="your_app_id",
|
|
97
97
|
app_secret="your_app_secret",
|
|
98
|
-
base_url="
|
|
98
|
+
base_url="后端 API 鉴权地址"
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
# 验证 token
|
|
@@ -130,8 +130,7 @@ class AigcAuthClient:
|
|
|
130
130
|
self.app_secret = app_secret or os.getenv("AIGC_AUTH_APP_SECRET")
|
|
131
131
|
self.base_url = (
|
|
132
132
|
base_url or
|
|
133
|
-
os.getenv("AIGC_AUTH_BASE_URL")
|
|
134
|
-
"https://aigc-auth.huacemedia.com/aigc-auth/api/v1"
|
|
133
|
+
os.getenv("AIGC_AUTH_BASE_URL")
|
|
135
134
|
)
|
|
136
135
|
self.timeout = timeout
|
|
137
136
|
self.cache_ttl = cache_ttl
|
{huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: huace-aigc-auth-client
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.17
|
|
4
4
|
Summary: 华策AIGC Auth Client - 提供 Token 验证、用户信息获取、权限检查、旧系统接入等功能
|
|
5
5
|
Author-email: Huace <support@huace.com>
|
|
6
6
|
License: MIT
|
|
@@ -44,8 +44,8 @@ pip install huace-aigc-auth-client
|
|
|
44
44
|
# 必填:应用 ID 和密钥(在鉴权中心创建应用后获取)
|
|
45
45
|
AIGC_AUTH_APP_ID=your_app_id
|
|
46
46
|
AIGC_AUTH_APP_SECRET=your_app_secret
|
|
47
|
-
#
|
|
48
|
-
AIGC_AUTH_BASE_URL=
|
|
47
|
+
# 鉴权服务地址(默认为生产环境)
|
|
48
|
+
AIGC_AUTH_BASE_URL=your-auth-api-url-prefix
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
如需通过 Nginx 代理:
|
|
@@ -74,7 +74,7 @@ client = AigcAuthClient()
|
|
|
74
74
|
client = AigcAuthClient(
|
|
75
75
|
app_id="your_app_id",
|
|
76
76
|
app_secret="your_app_secret",
|
|
77
|
-
base_url="
|
|
77
|
+
base_url="your-auth-api-url-prefix"
|
|
78
78
|
)
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -352,7 +352,7 @@ except AigcAuthError as e:
|
|
|
352
352
|
# .env 文件
|
|
353
353
|
AIGC_AUTH_APP_ID=your_app_id
|
|
354
354
|
AIGC_AUTH_APP_SECRET=your_app_secret
|
|
355
|
-
AIGC_AUTH_BASE_URL=
|
|
355
|
+
AIGC_AUTH_BASE_URL=your-auth-api-url-prefix
|
|
356
356
|
|
|
357
357
|
# 同步配置
|
|
358
358
|
AIGC_AUTH_SYNC_ENABLED=true
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
huace_aigc_auth_client/__init__.py,sha256=pyfBM-eZFHAUMSw8VfrxkeJfFlw5Qw9NKhUm9MZg3x4,4540
|
|
2
|
+
huace_aigc_auth_client/legacy_adapter.py,sha256=Zgti8lxR2kKeTSFfj66YfiY_TQtJL1B4pkXatG2g0sg,24108
|
|
3
|
+
huace_aigc_auth_client/sdk.py,sha256=OCZkA8IG81VJsYqgvirZqcDltJqdivahbDzpbcPul8E,23179
|
|
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.17.dist-info/licenses/LICENSE,sha256=z7dgC7KljhBLNvKjN15391nMj3aLt0gbud8-Yf1F8EQ,1063
|
|
7
|
+
huace_aigc_auth_client-1.1.17.dist-info/METADATA,sha256=pZ-NjOql_bEz5t_yFgtDmLG55pBUy3pVnIm0J7HTy08,22814
|
|
8
|
+
huace_aigc_auth_client-1.1.17.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
9
|
+
huace_aigc_auth_client-1.1.17.dist-info/top_level.txt,sha256=kbv0nQ6PQ0JVneWPH7O2AbtlJnP7AjvFJ6JjM6ZEBxo,23
|
|
10
|
+
huace_aigc_auth_client-1.1.17.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
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,,
|
|
File without changes
|
{huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{huace_aigc_auth_client-1.1.15.dist-info → huace_aigc_auth_client-1.1.17.dist-info}/top_level.txt
RENAMED
|
File without changes
|