Skip to content

Commit

Permalink
修复密码错误的返回错误
Browse files Browse the repository at this point in the history
  • Loading branch information
TreasureJade committed Jan 17, 2020
1 parent f40b824 commit d809868
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ResultVO login(LoginForm loginForm, HttpServletResponse response) {
UserDetails userDetails = jwtUserDetailService.loadUserByUsername(loginForm.getPhoneNum());

if (!new BCryptPasswordEncoder().matches(loginForm.getPassword(), userDetails.getPassword())) {
throw new GlobalException(ResultEnum.PASSWORD_ERROR);
return ResultVOUtil.error(ResultEnum.PASSWORD_ERROR);
}

Authentication token = new UsernamePasswordAuthenticationToken(loginForm.getPhoneNum(), loginForm.getPassword(), userDetails.getAuthorities());
Expand Down

0 comments on commit d809868

Please sign in to comment.