From 82dd7450afd04dc7a4da12f3c53a4e32f2b8d8ab Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Tue, 12 Nov 2024 11:55:44 +0800 Subject: [PATCH] feat : close sso --- app/Exception/Handler/ErrExceptionHandler.php | 1 - app/Middleware/Admin/JwtAuthMiddleware.php | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Exception/Handler/ErrExceptionHandler.php b/app/Exception/Handler/ErrExceptionHandler.php index ceadcbf..862e13a 100644 --- a/app/Exception/Handler/ErrExceptionHandler.php +++ b/app/Exception/Handler/ErrExceptionHandler.php @@ -2,7 +2,6 @@ namespace App\Exception\Handler; -use App\Constants\ReturnCode; use App\Exception\ErrException; use App\Lib\AdminReturn; use App\Lib\ApiReturn; diff --git a/app/Middleware/Admin/JwtAuthMiddleware.php b/app/Middleware/Admin/JwtAuthMiddleware.php index 3e260d5..a8ccf82 100644 --- a/app/Middleware/Admin/JwtAuthMiddleware.php +++ b/app/Middleware/Admin/JwtAuthMiddleware.php @@ -42,11 +42,11 @@ class JwtAuthMiddleware implements MiddlewareInterface } //单点登录 - if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) { - return $this->response->json( - $this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR) - ); - } +// if ($this->userCache->getAdminToken($userJwt['data']->id) != $authorization) { +// return $this->response->json( +// $this->apiReturn->error(AdminCode::getMessage(AdminCode::LOGIN_TOKEN_ERROR), AdminCode::LOGIN_TOKEN_ERROR) +// ); +// } Context::set('admin_id',$userJwt['data']->id); Context::set('role_id',$userJwt['data']->role);