2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-07-20 00060aeb3fc7a0e92e29988e6069f496add0e9a7
fix
已修改1个文件
7 ■■■■■ 文件已修改
sandu-common/src/main/java/com/sandu/common/security/token/JwtTokenProvider.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sandu-common/src/main/java/com/sandu/common/security/token/JwtTokenProvider.java
@@ -88,10 +88,9 @@
            loginUserInfo.setStatus(AdminStatusStatus.NORMAL.getCode());
            String key = String.format("%d_%d", loginUserInfo.getUserId(), loginUserInfo.getAdministratorType());
            String redisToken = String.valueOf(redisService.get(key));
            //TODO  上线记得改回来
//            if (redisToken == null || !token.equals(redisToken)) {
//                throw new BusinessException("token无效");
//            }
            if (redisToken == null || !token.equals(redisToken)) {
                throw new BusinessException("token无效");
            }
            return loginUserInfo;
        } catch (io.jsonwebtoken.security.SecurityException | MalformedJwtException e) {
            log.info("Invalid JWT signature.");