mirror of https://github.com/elunez/eladmin
验证用户密码匹配
parent
51560f3f82
commit
c558069be8
|
@ -102,6 +102,9 @@ public class AuthController {
|
||||||
JwtUserDto jwtUser = userDetailsService.loadUserByUsername(authUser.getUsername());
|
JwtUserDto jwtUser = userDetailsService.loadUserByUsername(authUser.getUsername());
|
||||||
// 验证用户密码
|
// 验证用户密码
|
||||||
if (!passwordEncoder.matches(password, jwtUser.getPassword())) {
|
if (!passwordEncoder.matches(password, jwtUser.getPassword())) {
|
||||||
|
// todo 验证下数据
|
||||||
|
log.info("jwtUser pwd: {}", jwtUser.getPassword());
|
||||||
|
log.info("authUser pwd: {}", password);
|
||||||
throw new BadRequestException("登录密码错误");
|
throw new BadRequestException("登录密码错误");
|
||||||
}
|
}
|
||||||
Authentication authentication = new UsernamePasswordAuthenticationToken(jwtUser, null, jwtUser.getAuthorities());
|
Authentication authentication = new UsernamePasswordAuthenticationToken(jwtUser, null, jwtUser.getAuthorities());
|
||||||
|
|
Loading…
Reference in New Issue