From 5238946658fda7d37753a957ee03549ebc7d7926 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Thu, 1 Apr 2021 14:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.0.2=E3=80=91=E3=80=90rule=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=99=BB=E5=BD=95=E5=A4=B1=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/stylefeng/roses/kernel/auth/auth/LoginUserImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/LoginUserImpl.java b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/LoginUserImpl.java index 1f7a148e5..dfb6574df 100644 --- a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/LoginUserImpl.java +++ b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/LoginUserImpl.java @@ -29,6 +29,7 @@ import cn.stylefeng.roses.kernel.auth.api.LoginUserApi; import cn.stylefeng.roses.kernel.auth.api.SessionManagerApi; import cn.stylefeng.roses.kernel.auth.api.context.LoginUserHolder; import cn.stylefeng.roses.kernel.auth.api.exception.AuthException; +import cn.stylefeng.roses.kernel.auth.api.exception.enums.AuthExceptionEnum; import cn.stylefeng.roses.kernel.auth.api.expander.AuthConfigExpander; import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser; import cn.stylefeng.roses.kernel.rule.util.HttpServletUtil; @@ -38,8 +39,6 @@ import javax.annotation.Resource; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; -import static cn.stylefeng.roses.kernel.auth.api.exception.enums.AuthExceptionEnum.TOKEN_GET_ERROR; - /** * 当前登陆用户的接口实现 * @@ -87,7 +86,7 @@ public class LoginUserImpl implements LoginUserApi { } // 获取不到token,直接告诉用户 - throw new AuthException(TOKEN_GET_ERROR); + throw new AuthException(AuthExceptionEnum.TOKEN_GET_ERROR); } @Override @@ -107,7 +106,7 @@ public class LoginUserImpl implements LoginUserApi { // session为空抛出异常 if (session == null) { - throw new AuthException(TOKEN_GET_ERROR); + throw new AuthException(AuthExceptionEnum.AUTH_EXPIRED_ERROR); } return session;