From 9df39e74bd3e2d02d1d7eb28c5788eeafedc7100 Mon Sep 17 00:00:00 2001 From: eastargh Date: Wed, 26 Aug 2026 13:47:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B7=A8=EC=95=BD=EC=A0=90=20=EC=A0=90?= =?UTF-8?q?=EA=B2=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/web.xml | 2 +- WebContent/WEB-INF/weblogic-web.xml | 2 +- WebContent/jsp/common/screen/emergency.jsp | 42 +++++- .../rms/common/context/MonitoringContext.java | 5 +- .../login/ChangePasswordResponseDto.java | 28 ++++ .../eai/rms/common/login/MainController.java | 137 +++++++++++++----- .../man/user/AdminUserPasswordHistory.java | 77 ++++++++++ .../AdminUserPasswordHistoryRepository.java | 9 ++ .../user/AdminUserPasswordHistoryService.java | 53 +++++++ .../message/LocaleMessage.properties | 7 +- .../message/LocaleMessage_en.properties | 7 +- .../message/LocaleMessage_ko.properties | 7 +- 12 files changed, 325 insertions(+), 51 deletions(-) create mode 100644 src/main/java/com/eactive/eai/rms/common/login/ChangePasswordResponseDto.java create mode 100644 src/main/java/com/eactive/eai/rms/data/entity/man/user/AdminUserPasswordHistory.java create mode 100644 src/main/java/com/eactive/eai/rms/data/entity/man/user/AdminUserPasswordHistoryRepository.java create mode 100644 src/main/java/com/eactive/eai/rms/data/entity/man/user/AdminUserPasswordHistoryService.java diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 503da76..57664b8 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -175,6 +175,6 @@ - 60 + 10 \ No newline at end of file diff --git a/WebContent/WEB-INF/weblogic-web.xml b/WebContent/WEB-INF/weblogic-web.xml index 99a381a..20461dc 100644 --- a/WebContent/WEB-INF/weblogic-web.xml +++ b/WebContent/WEB-INF/weblogic-web.xml @@ -145,6 +145,6 @@ - 60 + 10 \ No newline at end of file diff --git a/WebContent/jsp/common/screen/emergency.jsp b/WebContent/jsp/common/screen/emergency.jsp index dfc47f9..e85c537 100644 --- a/WebContent/jsp/common/screen/emergency.jsp +++ b/WebContent/jsp/common/screen/emergency.jsp @@ -102,7 +102,7 @@ window.location.href = response.redirectUrl; } else { // 로그인 실패 - alert(response.errorMessage || '로그인에 실패했습니다.'); + alert('로그인에 실패했습니다'); } }, error: function(xhr, status, error) { @@ -262,7 +262,36 @@ return true; } - + + // 비밀번호 변경 요청 (AJAX) - 서버 룰 검증 실패 시 모달을 닫지 않고 비밀번호 입력값만 초기화 + function submitChangePassword() { + if (!checkPwd()) { + return false; + } + + $.ajax({ + url: '', + type: 'POST', + data: $('#modalLoginForm').serialize(), + dataType: 'json', + success: function(response) { + alert(response.message); + if (response.success) { + window.location.href = response.redirectUrl || ''; + } else { + $("input[name=changePassword]").val(''); + $("input[name=confirmPassword]").val(''); + $("input[name=changePassword]").trigger("focus"); + } + }, + error: function() { + alert("<%= localeMessage.getString("login.pwdchangefail") %>"); + } + }); + + return false; + } + $(document).ready(function() { $("input[name=userId]").keydown(function(event){ if ( event.which == 13 ) { @@ -276,12 +305,12 @@ }); $("input[name=changePassword]").keydown(function(event){ if ( event.which == 13 ) { - $('#modalLoginForm').submit(); + submitChangePassword(); } }); $("input[name=confirmPassword]").keydown(function(event){ if ( event.which == 13 ) { - $('#modalLoginForm').submit(); + submitChangePassword(); } }); // Password Change 링크로 직접 열 때만 초기화 (JS에서 modal('show') 호출 시 relatedTarget 없음) @@ -387,7 +416,7 @@ -
" method="post" onsubmit="return checkPwd()" novalidate> + " method="post" onsubmit="return submitChangePassword()" novalidate>