From c004e6a5150df377c55d9875de82f0207cee7f48 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Thu, 15 Jan 2026 11:29:56 +0900 Subject: [PATCH] Implement SMS two-factor authentication with AJAX support --- .../eactive/ext/kjb/common/KjbProperty.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java b/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java index ee668cb..5255dd4 100644 --- a/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java +++ b/src/main/java/com/eactive/ext/kjb/common/KjbProperty.java @@ -150,8 +150,31 @@ public class KjbProperty { defaultValue = "true", description = "SSO 인증시 사용자 정보 동기화 여부(false 시 이름과 ID를 동일하게 처리. 나머지 정보는 무시)") private boolean ssoSyncInfo = true; - - + + + // SMS 2차 인증 + + @KjbPropertyValue( + key = "kjb.sms_auth.enabled", + defaultValue = "true", + description = "SMS 2차 인증 사용 여부. true 시 휴대폰번호 없는 사용자는 ID/PW 로그인 불가") + private boolean smsAuthEnabled = true; + + @KjbPropertyValue( + key = "kjb.sms_auth.mode", + defaultValue = "real", + description = "인증번호 생성 모드: real(랜덤), hhmm00(현재시각+00), fixed(고정값)") + @Pattern(regexp = "^(real|hhmm00|fixed)$", message = "kjb.sms_auth.mode는 real, hhmm00, fixed 중 하나여야 합니다.") + private String smsAuthMode = "real"; + + @KjbPropertyValue( + key = "kjb.sms_auth.fixed_value", + defaultValue = "654321", + description = "mode가 fixed일 때 사용할 고정 인증번호 (6자리 숫자)") + @Pattern(regexp = "^\\d{6}$", message = "kjb.sms_auth.fixed_value는 6자리 숫자여야 합니다.") + private String smsAuthFixedValue = "654321"; + + public String toJsonString(boolean isPretty) { return isPretty ? new GsonBuilder().setPrettyPrinting().create().toJson(this)