| | |
| | | // 我们还要判断密码是否正确,这里我们的密码使用BCryptPasswordEncoder进行加密的 |
| | | if (!new BCryptPasswordEncoder().matches(password, loginUserInfoVO.getPassword())) { |
| | | lockLogin(flag,userName); |
| | | throw new BadCredentialsException("密码不正确"); |
| | | throw new BadCredentialsException("账号或密码错误"); |
| | | } |
| | | // 还可以加一些其他信息的判断,比如用户账号已停用等判断 |
| | | if (loginUserInfoVO.getStatus().intValue() == 2) { |
| | |
| | | } |
| | | // 我们还要判断密码是否正确,这里我们的密码使用BCryptPasswordEncoder进行加密的 |
| | | if (!new BCryptPasswordEncoder().matches(password, loginUserInfoVO.getPassword())) { |
| | | throw new BadCredentialsException("密码不正确"); |
| | | throw new BadCredentialsException("账号或密码错误"); |
| | | } |
| | | // 还可以加一些其他信息的判断,比如用户账号已停用等判断 |
| | | if (loginUserInfoVO.getStatus().intValue() == 2) { |