mirror of https://gitee.com/stylefeng/roses
【7.0.2】【rule】更新登录失效问题
parent
be0625a043
commit
5238946658
|
@ -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.SessionManagerApi;
|
||||||
import cn.stylefeng.roses.kernel.auth.api.context.LoginUserHolder;
|
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.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.expander.AuthConfigExpander;
|
||||||
import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
|
import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
|
||||||
import cn.stylefeng.roses.kernel.rule.util.HttpServletUtil;
|
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.Cookie;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
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,直接告诉用户
|
// 获取不到token,直接告诉用户
|
||||||
throw new AuthException(TOKEN_GET_ERROR);
|
throw new AuthException(AuthExceptionEnum.TOKEN_GET_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -107,7 +106,7 @@ public class LoginUserImpl implements LoginUserApi {
|
||||||
|
|
||||||
// session为空抛出异常
|
// session为空抛出异常
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
throw new AuthException(TOKEN_GET_ERROR);
|
throw new AuthException(AuthExceptionEnum.AUTH_EXPIRED_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return session;
|
return session;
|
||||||
|
|
Loading…
Reference in New Issue