SMS인증창 오픈시 인증번호 focus
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-08-28 15:25:17 +09:00
parent 74f7aa5cf9
commit bc40362c47
3 changed files with 29 additions and 4 deletions
@@ -273,6 +273,9 @@ public interface MonitoringContext {
// 비밀번호 변경 시 재사용을 금지할 최근 이력 개수
public static final String RMS_PASSWORD_HISTORY_COUNT = "rms.password.history.count";
// 비밀번호 변경 시 SMS 2차 인증 사용 여부 (djb.sms_auth.enabled 와 함께 true 여야 동작)
public static final String RMS_PASSWORD_SMS_AUTH_ENABLED = "rms.password.sms_auth.enabled";
// API 상태변화 스윙챗 발송여부
public static final String DJB_UMS_MESSENGER_APIMONITOR_ENABLED = "djb.ums.messenger.api-monitor.enabled";
@@ -464,6 +464,11 @@ public class MainController implements InterceptorSkipController {
MonitoringContext.RMS_PASSWORD_HISTORY_COUNT, DEFAULT_PASSWORD_HISTORY_COUNT);
}
// 비밀번호 변경 시 SMS 2차 인증 사용 여부 (djb.sms_auth.enabled 와 rms.password.sms_auth.enabled 가 모두 true 여야 동작)
private boolean isPasswordChangeSmsAuthEnabled() {
return monitoringContext.getBooleanProperty(MonitoringContext.RMS_PASSWORD_SMS_AUTH_ENABLED, false);
}
// 로그인 실패 횟수 증가, 임계치 도달 시 계정 잠금
private int increaseLoginFailCount(UserInfo userInfo) {
int failCount = (userInfo.getLoginfailcount() == null ? 0 : userInfo.getLoginfailcount()) + 1;
@@ -909,8 +914,9 @@ public class MainController implements InterceptorSkipController {
}
// 5. SMS 2차 인증 필요 여부 체크 (비상모드는 로그인과 동일하게 우회)
// djb.sms_auth.enabled 와 rms.password.sms_auth.enabled 가 모두 true 일 때만 SMS 인증 수행
Boolean emergencyMode = (Boolean) session.getAttribute("emergencyMode");
if (!Boolean.TRUE.equals(emergencyMode) && smsAuthService.isEnabled()) {
if (!Boolean.TRUE.equals(emergencyMode) && smsAuthService.isEnabled() && isPasswordChangeSmsAuthEnabled()) {
if (!smsAuthService.hasValidPhoneNumber(userInfo)) {
UserAccessLogger.log(request, LOG_CATEGORY_LOGIN, "F", "휴대폰번호 미등록으로 비밀번호 변경 불가");
return ChangePasswordResponseDto.builder()