From 6c2583e364ae98516d875018ae5674726d483611 Mon Sep 17 00:00:00 2001 From: zhaodongsheng Date: Tue, 25 Jun 2024 14:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=88fix=EF=BC=89=EF=BC=88auth=EF=BC=89Afte?= =?UTF-8?q?r=20upgrading=20the=20JWT,=20adjust=20the=20secretl=20(#1211).?= =?UTF-8?q?=20(#1213)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evaluation/build_models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evaluation/build_models.py b/evaluation/build_models.py index f73e19c0b..384738d20 100644 --- a/evaluation/build_models.py +++ b/evaluation/build_models.py @@ -10,7 +10,9 @@ import jwt def get_authorization(): exp = time.time() + 100000 - token= jwt.encode({"token_user_name": "admin","exp": exp}, "secret", algorithm="HS512") + # secret 请和 com.tencent.supersonic.auth.api.authentication.config.AuthenticationConfig.tokenAppSecret 保持一致 + secret = "WIaO9YRRVt+7QtpPvyWsARFngnEcbaKBk783uGFwMrbJBaochsqCH62L4Kijcb0sZCYoSsiKGV/zPml5MnZ3uQ==" + token= jwt.encode({"token_user_name": "admin","exp": exp}, secret, algorithm="HS512") return "Bearer "+token def get_url_pre():