密码修改
This commit is contained in:
parent
5bc667038d
commit
34a97db42e
|
|
@ -43,13 +43,9 @@ public class UserAuthenticationProvider implements AuthenticationProvider {
|
|||
if (userInfo == null) {
|
||||
throw new UsernameNotFoundException("用户名不存在");
|
||||
}
|
||||
try {
|
||||
//密码加密
|
||||
String daya= Md5Utils.createPwdEncrypt(userName,Md5Utils.generateMD5(password).toUpperCase(),userInfo.getSalt());
|
||||
if(!Md5Utils.validatePasswordBast64(daya, userInfo.getPassword())){
|
||||
throw new BadCredentialsException("密码不正确");
|
||||
}
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
//密码加密
|
||||
String daya= Md5Utils.createPwdEncrypt(userName,password.toUpperCase(),userInfo.getSalt());
|
||||
if(!Md5Utils.validatePasswordBast64(daya, userInfo.getPassword())){
|
||||
throw new BadCredentialsException("密码不正确");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue