mirror of https://gitee.com/stylefeng/roses
【auth】暂时关掉密码传输加密解密
parent
079884ec94
commit
65b6a875e6
|
@ -141,14 +141,14 @@ public class AuthServiceImpl implements AuthServiceApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 解密密码的密文
|
// 2. 解密密码的密文
|
||||||
String decryptPassword = passwordTransferEncryptApi.decrypt(loginRequest.getPassword());
|
// String decryptPassword = passwordTransferEncryptApi.decrypt(loginRequest.getPassword());
|
||||||
|
|
||||||
// 3. 获取用户密码的加密值和用户的状态
|
// 3. 获取用户密码的加密值和用户的状态
|
||||||
UserLoginInfoDTO userValidateInfo = userServiceApi.getUserLoginInfo(loginRequest.getAccount());
|
UserLoginInfoDTO userValidateInfo = userServiceApi.getUserLoginInfo(loginRequest.getAccount());
|
||||||
|
|
||||||
// 4. 校验用户密码是否正确(BCrypt算法)
|
// 4. 校验用户密码是否正确(BCrypt算法)
|
||||||
if (validatePassword) {
|
if (validatePassword) {
|
||||||
Boolean checkResult = passwordStoredEncryptApi.checkPassword(decryptPassword, userValidateInfo.getUserPasswordHexed());
|
Boolean checkResult = passwordStoredEncryptApi.checkPassword(loginRequest.getPassword(), userValidateInfo.getUserPasswordHexed());
|
||||||
if (!checkResult) {
|
if (!checkResult) {
|
||||||
throw new AuthException(AuthExceptionEnum.USERNAME_PASSWORD_ERROR);
|
throw new AuthException(AuthExceptionEnum.USERNAME_PASSWORD_ERROR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue