das项目结构修改
This commit is contained in:
parent
f8cbe540ca
commit
3e05a4d1bb
@ -34,8 +34,10 @@ public class DecryptingOncePerRequestFilter extends OncePerRequestFilter {
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
String iv = request.getHeader("v");
|
||||
String contentType = request.getHeader("Content-Type");
|
||||
String method = request.getMethod();
|
||||
|
||||
|
||||
if ("POST".equals(method) && StringUtils.isNotBlank(contentType) && contentType.contains("application/json")) {
|
||||
// 读取加密的请求体数据
|
||||
String encryptedData = readRequestBody(request);
|
||||
if (StringUtils.isNotBlank(encryptedData)) {
|
||||
@ -46,6 +48,9 @@ public class DecryptingOncePerRequestFilter extends OncePerRequestFilter {
|
||||
} else {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
} else {
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ public class TokenOncePerRequestFilter extends OncePerRequestFilter {
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
|
||||
String iv = request.getHeader("v");
|
||||
// token解密
|
||||
String token = request.getHeader("token");
|
||||
|
@ -67,10 +67,10 @@ public class LoginServiceImpl implements ILoginService {
|
||||
loginInfo.setMsg("无账号信息");
|
||||
return loginInfo;
|
||||
}
|
||||
// if (!CaptchaUtil.checkVerificationCode(key, code, adminRedisTemplate)) {
|
||||
// loginInfo.setMsg("验证码不正确");
|
||||
// return loginInfo;
|
||||
// }
|
||||
if (!CaptchaUtil.checkVerificationCode(key, code, adminRedisTemplate)) {
|
||||
loginInfo.setMsg("验证码不正确");
|
||||
return loginInfo;
|
||||
}
|
||||
if (!BCrypt.checkpw(password, sysUser.getPassword())) {
|
||||
loginInfo.setMsg("账号密码错误");
|
||||
return loginInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user