From 359ec45b055c86907368228bbf5891dc80b68c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 2 Aug 2023 10:17:22 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AFid=E4=B8=8Etoken=E6=A0=A1=E9=AA=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/common/security/config/SecurityConfig.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/config/SecurityConfig.java b/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/config/SecurityConfig.java index 063d9131..69a2e104 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/config/SecurityConfig.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/org/dromara/common/security/config/SecurityConfig.java @@ -54,10 +54,8 @@ public class SecurityConfig implements WebMvcConfigurer { String clientId = StpUtil.getExtra(LoginHelper.CLIENT_KEY).toString(); if (!StringUtils.equalsAny(clientId, headerCid, paramCid)) { // token 无效 - throw NotLoginException.newInstance( - StpUtil.getLoginType(), - NotLoginException.INVALID_TOKEN, - NotLoginException.NOT_TOKEN_MESSAGE, + throw NotLoginException.newInstance(StpUtil.getLoginType(), + "-100", "客户端ID与Token不匹配", StpUtil.getTokenValue()); }