From bb5b3f4d4b17a15b5031d192d2df2d527796e60c Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Mon, 28 Jul 2025 16:57:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E7=99=BB=E5=87=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3,=20=E7=9B=B4=E6=8E=A5=E4=BB=8E=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=A4=B4=E4=B8=AD=E8=8E=B7=E5=8F=96token,=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E4=BC=A0=E9=80=92token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module_admin/controller/login_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-fastapi-backend/module_admin/controller/login_controller.py b/ruoyi-fastapi-backend/module_admin/controller/login_controller.py index 781d94e..9a255ef 100644 --- a/ruoyi-fastapi-backend/module_admin/controller/login_controller.py +++ b/ruoyi-fastapi-backend/module_admin/controller/login_controller.py @@ -141,7 +141,10 @@ async def register_user(request: Request, user_register: UserRegister, query_db: @loginController.post('/logout') -async def logout(request: Request, token: Optional[str] = Depends(oauth2_scheme)): +async def logout(request: Request + # , token: Optional[str] = Depends(oauth2_scheme) + ): + token = request.headers.get('Authorization').split(" ")[-1] payload = jwt.decode( token, JwtConfig.jwt_secret_key, algorithms=[JwtConfig.jwt_algorithm], options={'verify_exp': False} )