마이페이지 > 보안로그인 < 퍼블
This commit is contained in:
parent
abb8b9017c
commit
9741b0e43a
@ -2942,6 +2942,23 @@ public class EgovMypageController {
|
||||
return "web/user/mberSecession";
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원탈퇴 본인인증 화면
|
||||
*/
|
||||
@RequestMapping(value="/web/user/mberSecureLogin.do")
|
||||
public String secureLogin(@ModelAttribute MberManageVO mberManageVO
|
||||
, ModelMap model, HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
if(loginVO == null) {
|
||||
//redirectAttributes.addFlashAttribute("message", "문자온 서비스는 로그인 후 이용 가능합니다.");
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
|
||||
model.addAttribute("pageTab", "mberSecureLogin");
|
||||
return "web/user/mberSecureLogin";
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원탈퇴 상세정보 화면
|
||||
*/
|
||||
|
||||
@ -56,323 +56,6 @@ $(document).ready(function(){
|
||||
});
|
||||
|
||||
|
||||
// 보안 로그인
|
||||
$(document).ready(function(){
|
||||
|
||||
// 인증번호 발송 버튼
|
||||
$('#certReqBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
|
||||
if (certReqPhone==''){
|
||||
alert("핸드폰번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/sendSysMsgDataAjax.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
alert(returnData.object.msg);
|
||||
$("#certReqPhone").prop("disabled", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
// 인증 버튼
|
||||
$('#certConfirmBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
var certNumber = $('#certNumber').val();
|
||||
|
||||
if (certNumber==''){
|
||||
alert("인증번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone, "checkNo" : certNumber }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/selectSysMsgLogCheck.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
// alert(returnData.object.msg);
|
||||
regCertPhone(params);
|
||||
}
|
||||
else if(returnData.status == 'BAD_REQUEST'){
|
||||
alert(returnData.message);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#showLoginBtn').on('click', function() {
|
||||
if ($('#securityLogin').is(':visible')) {
|
||||
$('#securityLogin').hide();
|
||||
} else {
|
||||
$('#securityLogin').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// IP 추가 버튼 클릭 시 tr 추가
|
||||
$(".btn_ip_plus").click(function () {
|
||||
// 추가할 HTML 구조
|
||||
const ipTr = `
|
||||
<tr class="ip-new">
|
||||
<td><input type="text" class="input_text"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g, '');" maxlength="15"/></td>
|
||||
<td><input type="text" class="input_text"></td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<button type="button" class="btnType btnType5" id="ipRegBtn">등록</button>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
// 이미 추가된 `.ip-row`가 있는지 확인
|
||||
if ($(".ip_table tbody .ip-new").length === 0) {
|
||||
$(".ip_table tbody").prepend(ipTr); // 중복되지 않으면 추가
|
||||
} else {
|
||||
alert("이미 추가된 항목이 있습니다.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// IP 등록버튼
|
||||
$(document).on('click', '#ipRegBtn', function () {
|
||||
// 현재 클릭된 버튼의 부모 tr 요소
|
||||
const $currentRow = $(this).closest('tr');
|
||||
|
||||
// 입력값 가져오기
|
||||
const ipValue = $currentRow.find('td:eq(0) input').val(); // 첫 번째 열 (IP)
|
||||
const memoValue = $currentRow.find('td:eq(1) input').val(); // 두 번째 열 (메모)
|
||||
|
||||
// 예외 처리
|
||||
if (!ipValue) {
|
||||
alert("등록할 IP를 입력해주세요.");
|
||||
$currentRow.find('td:eq(0) input').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const ipRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
||||
|
||||
if (!ipRegex.test(ipValue)) {
|
||||
alert("유효하지 않은 IP 주소입니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var params = {
|
||||
"certIp" : ipValue
|
||||
, "certMemo" : memoValue
|
||||
}
|
||||
|
||||
if(!confirm("IP를 등록 하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/insertCertIp.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}else if(returnData.status == 'CONFLICT'){
|
||||
alert(returnData.message);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
findAllCertIp();
|
||||
});
|
||||
|
||||
|
||||
function regCertPhone(params){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/phone/insertCertPhone.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}else if(returnData.status == 'CONFLICT'){
|
||||
alert(returnData.message);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function findAllCertIp(){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $(".ip_table tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
function findAllCertPhone(){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $(".ip_table tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
// IP 삭제
|
||||
function deleteRow(p_ip){
|
||||
|
||||
var params = {
|
||||
"certIp" : p_ip
|
||||
}
|
||||
if(!confirm("IP를 삭제 하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/deleteCertIp.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//기간 요일 지정
|
||||
function setCalVal(val,targetObj){
|
||||
$('input[name='+targetObj+']').val(val) ;
|
||||
|
||||
645
src/main/webapp/WEB-INF/jsp/web/user/mberSecureLogin.jsp
Normal file
645
src/main/webapp/WEB-INF/jsp/web/user/mberSecureLogin.jsp
Normal file
@ -0,0 +1,645 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
|
||||
<script language=javascript>
|
||||
|
||||
|
||||
//보안 로그인
|
||||
$(document).ready(function(){
|
||||
|
||||
// 허용 IP 등록
|
||||
$(".btn_allow_ip_add").click(function () {
|
||||
if (confirm("현재 접속중인 IP를 접속 허용 IP로 등록하시겠습니까?")) {
|
||||
alert("접속 허용 IP 등록이 완료되었습니다.");
|
||||
} else {}
|
||||
});
|
||||
|
||||
// on/off 시 confirm 창 노출
|
||||
$('.security_set .tab_depth1 a').click(function () {
|
||||
if ($(this).text().trim() == "ON") {
|
||||
confirm("보안로그인 설정 후 로그인 시, 등록한 휴대폰번호로 추가 인증이 진행됩니다");
|
||||
} else {
|
||||
confirm("가입자 휴대폰번호로 본인인증 후 해제가 가능하며, 보안로그인 설정을 해제함으로써 발생하는 손해에 대하여 회사는 책임지지 않습니다.");
|
||||
}
|
||||
});
|
||||
|
||||
// 인증번호 발송 버튼
|
||||
$('#certReqBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
|
||||
if (certReqPhone==''){
|
||||
alert("핸드폰번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/sendSysMsgDataAjax.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
alert(returnData.object.msg);
|
||||
$("#certReqPhone").prop("disabled", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
// 인증 버튼
|
||||
$('#certConfirmBtn').on('click', function(){
|
||||
var certReqPhone = $('#certReqPhone').val();
|
||||
var certNumber = $('#certNumber').val();
|
||||
|
||||
if (certNumber==''){
|
||||
alert("인증번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
var params = {"mbtlnum" : certReqPhone, "checkNo" : certNumber }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : "<c:url value='/cert/phone/selectSysMsgLogCheck.do' />",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.status == 'OK'){
|
||||
// alert(returnData.object.msg);
|
||||
regCertPhone(params);
|
||||
}
|
||||
else if(returnData.status == 'BAD_REQUEST'){
|
||||
alert(returnData.message);
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#showLoginBtn').on('click', function() {
|
||||
if ($('#securityLogin').is(':visible')) {
|
||||
$('#securityLogin').hide();
|
||||
} else {
|
||||
$('#securityLogin').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// IP 추가 버튼 클릭 시 tr 추가
|
||||
$(".btn_ip_plus").click(function () {
|
||||
// 추가할 HTML 구조
|
||||
const ipTr = `
|
||||
<tr class="ip-new">
|
||||
<td><input type="text" class="input_text"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g, '');" maxlength="15"/></td>
|
||||
<td><input type="text" class="input_text"></td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<button type="button" class="btnType btnType5" id="ipRegBtn">등록</button>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
// 이미 추가된 `.ip-row`가 있는지 확인
|
||||
if ($("#ipTable tbody .ip-new").length === 0) {
|
||||
$("#ipTable tbody").prepend(ipTr); // 중복되지 않으면 추가
|
||||
} else {
|
||||
alert("이미 추가된 항목이 있습니다.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// IP 등록버튼
|
||||
$(document).on('click', '#ipRegBtn', function () {
|
||||
// 현재 클릭된 버튼의 부모 tr 요소
|
||||
const $currentRow = $(this).closest('tr');
|
||||
|
||||
// 입력값 가져오기
|
||||
const ipValue = $currentRow.find('td:eq(0) input').val(); // 첫 번째 열 (IP)
|
||||
const memoValue = $currentRow.find('td:eq(1) input').val(); // 두 번째 열 (메모)
|
||||
|
||||
// 예외 처리
|
||||
if (!ipValue) {
|
||||
alert("등록할 IP를 입력해주세요.");
|
||||
$currentRow.find('td:eq(0) input').focus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const ipRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
||||
|
||||
if (!ipRegex.test(ipValue)) {
|
||||
alert("유효하지 않은 IP 주소입니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var params = {
|
||||
"certIp" : ipValue
|
||||
, "certMemo" : memoValue
|
||||
}
|
||||
|
||||
if(!confirm("IP를 등록 하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/insertCertIp.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}else if(returnData.status == 'CONFLICT'){
|
||||
alert(returnData.message);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
findAllCertIp();
|
||||
});
|
||||
|
||||
|
||||
function regCertPhone(params){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/phone/insertCertPhone.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}else if(returnData.status == 'CONFLICT'){
|
||||
alert(returnData.message);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function findAllCertIp(){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $("#ipTable tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
function findAllCertPhone(){
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $("#ipTable tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
//IP 삭제
|
||||
function deleteRow(p_ip){
|
||||
|
||||
console.log('p_ip : ', p_ip);
|
||||
var params = {
|
||||
"certIp" : p_ip
|
||||
}
|
||||
if(!confirm("IP를 삭제 하시겠습니까?")){
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/deleteCertIp.do",
|
||||
data: params,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
if(returnData.status == 'OK'){
|
||||
findAllCertIp();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("오류가 발생하였습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div class="mask"></div>
|
||||
|
||||
<!-- 휴대폰인증 팝업 -->
|
||||
<div class="tooltip-wrap">
|
||||
<div class="popup-com certify_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 500px;">
|
||||
<div class="popup_heading">
|
||||
<p>휴대폰 인증</p>
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
|
||||
</div>
|
||||
<div class="layer_in">
|
||||
<div class="hascont">
|
||||
<table class="layer_tType1">
|
||||
<caption>본인인증(step1) 표</caption>
|
||||
<colgroup>
|
||||
<col style="width: 95px">
|
||||
<col style="width: auto">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>핸드폰번호</th>
|
||||
<td>
|
||||
<label for="" class="label">핸드폰번호 입력</label>
|
||||
<input type="text" placeholder="‘-’없이 번호만 입력 " id="certReqPhone" onfocus="this.placeholder=''"
|
||||
onblur="this.placeholder='‘-’없이 번호만 입력 '" class="inputLight" style="width: 200px;"
|
||||
oninput="this.value = this.value.replace(/[^0-9]/g, '');" maxlength="14"/>
|
||||
<button type="button" id="certReqBtn" class="btnType btnType6" style="width:90px">인증요청</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인증번호</th>
|
||||
<td>
|
||||
<label for="" class="label">인증번호 입력</label>
|
||||
<input type="text" placeholder="인증번호 4자리 입력" id="certNumber" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 4자리 입력'" class="inputLight" style="width: 200px;">
|
||||
<button type="button" id="certConfirmBtn" class="btnType btnType6" style="width:90px">확인</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup_btn_wrap2">
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close" data-focus-next="popup05">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--// 휴대폰인증 팝업 -->
|
||||
|
||||
<div class="inner">
|
||||
<!-- send top -->
|
||||
<div class="send_top">
|
||||
<!-- tab button -->
|
||||
<%@include file="/WEB-INF/jsp/web/user/mypageHeader.jsp"%>
|
||||
<!--// tab button -->
|
||||
<!-- 마이페이지 - 회원해지 -->
|
||||
<div class="mypage_content current" id="tab5_7">
|
||||
<div class="heading">
|
||||
<h2>보안로그인</h2>
|
||||
</div>
|
||||
<div class="my_dashboard">
|
||||
|
||||
<!-- 보안로그인 -->
|
||||
<div class="security_login">
|
||||
|
||||
<ul class="explanation_wrap box info">
|
||||
<li>· 사이트 부정로그인으로 인한 피해를 방지할 수 있는 2차 로그인 인증 서비스입니다. </li>
|
||||
<li>· 인증 휴대폰번호 추가 등록 또는 IP 접속 허용을 통해 편리한 사용이 가능합니다.</li>
|
||||
<li>· 보안로그인 기능을 사용할 경우 로그인 시 등록한 휴대폰번호로 추가 인증이 진행됩니다.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- 보안로그인 설정(허용 IP 아닌 경우) -->
|
||||
<div class="security_set box">
|
||||
<div class="title_wrap">
|
||||
<p class="dashboard_title">보안로그인</p>
|
||||
<div class="title_box ip_add_wrap">
|
||||
<span>현재 접속중인 IP : <b>000.000.000.00</b></span>
|
||||
<button type="button" class="btnType btnType6 btn_allow_ip_add">허용 IP 등록</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set_area">
|
||||
<p class="lately_date">최근 변경일시 : <span>2024-11-01 12:49</span></p>
|
||||
|
||||
<div class="tab_depth1">
|
||||
<a href="#none" class="on">ON</a>
|
||||
<a href="#none">OFF</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //보안로그인 설정(허용 IP 아닌 경우) -->
|
||||
|
||||
<!-- 보안로그인 설정(허용 IP인 경우) -->
|
||||
<div class="security_set box">
|
||||
<div class="title_wrap">
|
||||
<p class="dashboard_title">보안로그인</p>
|
||||
<div class="title_box ip_add_wrap">
|
||||
<span>현재 접속중인 IP : <b>000.000.000.00 [허용 IP]</b></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="set_area">
|
||||
<p class="lately_date">최근 변경일시 : <span>2024-11-01 12:49</span></p>
|
||||
|
||||
<div class="tab_depth1">
|
||||
<a href="#none" class="on">ON</a>
|
||||
<a href="#none">OFF</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //보안로그인 설정(허용 IP인 경우) -->
|
||||
|
||||
<!-- 인증 휴대폰번호 관리 -->
|
||||
<div class="title_area">
|
||||
<p class="dashboard_title">인증 휴대폰번호 관리</p>
|
||||
<p class="qmMark">?</p>
|
||||
<div class="hover_cont" style="width:330px;left:240px;top:25px;">
|
||||
<p>인증에 사용할 휴대폰번호를 추가로 등록하여 관리할 수 있습니다. <br>
|
||||
(등록 및 삭제 시 휴대폰 본인인증 필요)</p>
|
||||
</div>
|
||||
<button type="button" data-tooltip="popup05" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
</div>
|
||||
|
||||
<div class="table_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 26%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 26%;">
|
||||
<col style="width: 140px;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">휴대폰번호</th>
|
||||
<th scope="col">별칭</th>
|
||||
<th scope="col">메모</th>
|
||||
<th scope="col">등록일시</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5">등록된 IP 주소가 없습니다.</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>010-0000-0000</td>
|
||||
<td class="td_memo">메모 내용</td>
|
||||
<td>2024-11-04 11:54</td>
|
||||
<td>
|
||||
<button type="button" class="btnType btnType5 btn_edit" style="margin:0 5px 0 0;" onclick="memoEdit(this);">수정
|
||||
</button><button type="button" class="btnType btn_text btn_lightgray fill btn_28">삭제</button>
|
||||
</td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- //인증 휴대폰번호 관리 -->
|
||||
|
||||
<!-- 접속 IP관리 -->
|
||||
<div class="title_area">
|
||||
<p class="dashboard_title">접속 IP 관리</p>
|
||||
<p class="qmMark">?</p>
|
||||
<div class="hover_cont" style="width:380px;left:160px;top:25px;">
|
||||
<p>접속 IP를 미리 등록할 경우 2차 로그인 인증 없이 접속이 가능합니다. <br>
|
||||
<span>(공용 PC는 보안상의 이유로 등록을 권장하지 않습니다.)</span></p>
|
||||
</div>
|
||||
<button type="button" class="btn_plus btn_ip_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
</div>
|
||||
|
||||
<div class="table_wrap" id="ipTable">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 26%;">
|
||||
<col style="width: auto;">
|
||||
<col style="width: 26%;">
|
||||
<col style="width: 100px;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">허용IP</th>
|
||||
<th scope="col">메모</th>
|
||||
<th scope="col">등록일시</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4">등록된 IP 주소가 없습니다.</td>
|
||||
</tr>
|
||||
<!-- <tr> -->
|
||||
<!-- <td>192.168.0.0</td> -->
|
||||
<!-- <td>dadfadfjadkfjalkdjfajflajdlfjaldjflajd</td> -->
|
||||
<!-- <td>2024-11-11 11:11</td> -->
|
||||
<!-- <td><button type="button" class="btnType btn_text btn_lightgray fill btn_28">삭제</button></td> -->
|
||||
<!-- </tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- //접속 IP관리 -->
|
||||
|
||||
|
||||
<!-- 로그인 내역 -->
|
||||
<div class="title_area">
|
||||
<p class="dashboard_title">로그인 내역 <span class="small_text">로그인 내역은 최대 90일까지만 보관됩니다.</span></p>
|
||||
</div>
|
||||
|
||||
<div class="table_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width:calc(100% /3);">
|
||||
<col style="width:calc(100% /3);">
|
||||
<col style="width:calc(100% /3);">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">로그인 일시</th>
|
||||
<th scope="col">로그인 IP</th>
|
||||
<th scope="col">로그인 환경</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>PC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>모바일</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>PC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>모바일</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>PC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>모바일</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>PC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>모바일</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>PC</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2024-11-20 13:57:12</td>
|
||||
<td>119.193.215.98</td>
|
||||
<td>모바일</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- //로그인 내역 -->
|
||||
<!-- pagination -->
|
||||
<ul class="pagination">
|
||||
<li class="page_first"><button><img src="/publish/images/content/page_first.png" alt=""></button></li>
|
||||
<li class="page_prev"><button><img src="/publish/images/content/page_prev.png" alt=""></button></li>
|
||||
<li class="on"><button>1</button></li>
|
||||
<li><button>2</button></li>
|
||||
<li><button>3</button></li>
|
||||
<li><button>4</button></li>
|
||||
<li><button>5</button></li>
|
||||
<li><button>6</button></li>
|
||||
<li><button>7</button></li>
|
||||
<li><button>8</button></li>
|
||||
<li><button>9</button></li>
|
||||
<li><button>10</button></li>
|
||||
<li class="page_next"><button><img src="/publish/images/content/page_next.png" alt=""></button></li>
|
||||
<li class="page_last"><button><img src="/publish/images/content/page_last.png" alt=""></button></li>
|
||||
</ul><!-- pagination -->
|
||||
|
||||
</div>
|
||||
<!-- //보안로그인 -->
|
||||
</div>
|
||||
</div>
|
||||
<!--// 마이페이지 - 회원해지 -->
|
||||
</div>
|
||||
<!--// send top -->
|
||||
</div>
|
||||
<!--// content 영역 -->
|
||||
@ -36,8 +36,9 @@ $(document).ready(function(){
|
||||
<li class="tab" id="mberSecession">
|
||||
<button type="button" onclick="TabType5(this,'6'); location.href='/web/user/mberSecession.do'">회원탈퇴</button>
|
||||
</li>
|
||||
<li class="tab" id="kisaReport">
|
||||
<button type="button" onclick="TabType5(this,'7'); location.href='/web/user/kisaReport.do'">KISA 신고</button>
|
||||
<li class="tab" id="mberSecureLogin">
|
||||
<!-- <button type="button" onclick="TabType5(this,'7'); location.href='/web/user/kisaReport.do'">KISA 신고</button> -->
|
||||
<button type="button" onclick="TabType5(this,'7'); location.href='/web/user/mberSecureLogin.do'">보안로그인</button>
|
||||
</li>
|
||||
</ul>
|
||||
<!--// tab button -->
|
||||
Loading…
Reference in New Issue
Block a user