优化token过期 异常信息描述
This commit is contained in:
parent
4c0c9175ed
commit
3c47d71dde
@ -67,7 +67,7 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
|
|||||||
try {
|
try {
|
||||||
systemUser = JsonUtil.parseObject(JWT.decode(token).getAudience().get(0), SystemUser.class);
|
systemUser = JsonUtil.parseObject(JWT.decode(token).getAudience().get(0), SystemUser.class);
|
||||||
} catch (JWTDecodeException j) {
|
} catch (JWTDecodeException j) {
|
||||||
throw new XRetryServerException("无效token");
|
throw new XRetryServerException("登陆过期,请重新登陆");
|
||||||
}
|
}
|
||||||
|
|
||||||
systemUser = systemUserMapper.selectOne(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getUsername, systemUser.getUsername()));
|
systemUser = systemUserMapper.selectOne(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getUsername, systemUser.getUsername()));
|
||||||
@ -82,7 +82,7 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
|
|||||||
try {
|
try {
|
||||||
jwtVerifier.verify(token);
|
jwtVerifier.verify(token);
|
||||||
} catch (JWTVerificationException e) {
|
} catch (JWTVerificationException e) {
|
||||||
throw new XRetryServerException("无效token");
|
throw new XRetryServerException("登陆过期,请重新登陆");
|
||||||
}
|
}
|
||||||
|
|
||||||
RoleEnum role = loginRequired.role();
|
RoleEnum role = loginRequired.role();
|
||||||
|
@ -39,10 +39,14 @@ public class GroupConfigRequestVO {
|
|||||||
*/
|
*/
|
||||||
private Integer routeKey;
|
private Integer routeKey;
|
||||||
|
|
||||||
@NotEmpty(groups = PostMapping.class)
|
/**
|
||||||
|
* 通知列表
|
||||||
|
*/
|
||||||
private List<NotifyConfigVO> notifyList;
|
private List<NotifyConfigVO> notifyList;
|
||||||
|
|
||||||
@NotEmpty(groups = PostMapping.class)
|
/**
|
||||||
|
* 场景列表
|
||||||
|
*/
|
||||||
private List<SceneConfigVO> sceneList;
|
private List<SceneConfigVO> sceneList;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
Loading…
Reference in New Issue
Block a user