패스워드 초기화시 잠금 해제 되도록 변경
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ public class AccountRecoveryController {
|
||||
|
||||
try {
|
||||
// 사용자 정보 확인
|
||||
portalUserAuthService.initializePassword(
|
||||
portalUserAuthService.resetPassword(
|
||||
passwordReset.getLoginId(),
|
||||
passwordReset.getUserName(),
|
||||
passwordReset.getMobileNumber()
|
||||
|
||||
@@ -94,13 +94,16 @@ public class PortalUserAuthService implements UserDetailsService {
|
||||
return portalUserRepository.findPortalUserByEmailAddr(emailAddr).orElseThrow(() -> new UserNotFoundException("USER_NOT_FOUND_MESSAGE"));
|
||||
}
|
||||
|
||||
public void initializePassword(String loginId, String userName, String mobileNumber) {
|
||||
public void resetPassword(String loginId, String userName, String mobileNumber) {
|
||||
|
||||
PortalUser portalUser = portalUserRepository.findByLoginIdAndUserNameAndMobileNumber(loginId, userName, mobileNumber)
|
||||
.orElseThrow(() -> new UserNotFoundException("일치하는 사용자 정보를 찾을 수 없습니다."));
|
||||
|
||||
String tempPassword = EncryptionUtil.generateNewPasswordForKjbank(loginId);
|
||||
portalUser.setPasswordHash(passwordEncoder.encode(tempPassword));
|
||||
if ("Y".equalsIgnoreCase(portalUser.getAccountLockYn())) {
|
||||
portalUser.setAccountLockYn("N");
|
||||
}
|
||||
|
||||
portalUserRepository.save(portalUser);
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user