보안로그인 진행중
This commit is contained in:
parent
9c40db1374
commit
9b3a4a3362
@ -1,5 +1,7 @@
|
||||
package itn.let.cert.ip.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import itn.let.mail.service.StatusResponse;
|
||||
|
||||
public interface CertIpService {
|
||||
@ -22,6 +24,11 @@ public interface CertIpService {
|
||||
|
||||
public StatusResponse deleteCertIp(MberCertIpVO mberCertIpVO);
|
||||
|
||||
public Boolean checkCertIp(MberCertIpVO mberCertIpVO);
|
||||
|
||||
public Boolean checkRegCertIp(MberCertIpVO mberCertIpVO);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package itn.let.cert.ip.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.FdlException;
|
||||
@ -9,6 +11,9 @@ public interface CertLoginLogService {
|
||||
|
||||
public void insertCertLoginLog(MberCertLoginLogVO mberCertLoginLogVO, HttpServletRequest request) throws FdlException;
|
||||
|
||||
public List<MberCertLoginLogVO> findAllCertLoginLogVO(MberCertLoginLogVO mberCertLoginLogVO);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -27,5 +27,13 @@ public class CertIpDAO extends EgovAbstractDAO {
|
||||
public MberCertIpVO findByMberCertIpList(MberCertIpVO mberCertIpVO) {
|
||||
return (MberCertIpVO) select("MberCertIpVO.findByMberCertIpList", mberCertIpVO);
|
||||
}
|
||||
|
||||
public List<MberCertIpVO> checkCertIp(MberCertIpVO mberCertIpVO) {
|
||||
return (List<MberCertIpVO>) list("MberCertIpVO.checkCertIp", mberCertIpVO);
|
||||
}
|
||||
|
||||
public List<MberCertIpVO> checkRegCertIp(MberCertIpVO mberCertIpVO) {
|
||||
return (List<MberCertIpVO>) list("MberCertIpVO.checkRegCertIp", mberCertIpVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -21,8 +21,8 @@ public class CertIpServiceImpl extends EgovAbstractServiceImpl implements CertIp
|
||||
|
||||
|
||||
@Override
|
||||
public StatusResponse selectMberCertIpList(MberCertIpVO mberCertPhoneVO) {
|
||||
List<MberCertIpVO> mberCertIpListVO = certIpDAO.selectMberCertIpList(mberCertPhoneVO);
|
||||
public StatusResponse selectMberCertIpList(MberCertIpVO mberCertIpVO) {
|
||||
List<MberCertIpVO> mberCertIpListVO = certIpDAO.selectMberCertIpList(mberCertIpVO);
|
||||
return new StatusResponse(HttpStatus.OK, mberCertIpListVO, LocalDateTime.now());
|
||||
}
|
||||
|
||||
@ -43,5 +43,26 @@ public class CertIpServiceImpl extends EgovAbstractServiceImpl implements CertIp
|
||||
certIpDAO.deleteCertIp(mberCertIpVO);
|
||||
return new StatusResponse(HttpStatus.OK, "삭제 하였습니다.", LocalDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean checkCertIp(MberCertIpVO mberCertIpVO) {
|
||||
List<MberCertIpVO> mberCertIpListVO = certIpDAO.checkCertIp(mberCertIpVO);
|
||||
if(mberCertIpListVO.size()>0) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkRegCertIp(MberCertIpVO mberCertIpVO) {
|
||||
List<MberCertIpVO> mberCertIpListVO = certIpDAO.checkRegCertIp(mberCertIpVO);
|
||||
if(mberCertIpListVO.size()>0) {
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package itn.let.cert.ip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||
@ -37,5 +39,9 @@ public class CertLoginLogDAO extends EgovAbstractDAO {
|
||||
public void updateCertLoginLog(MberCertLoginLogVO mberCertLoginLogVO) {
|
||||
insert("MberCertLoginLogVO.updateCertLoginLog", mberCertLoginLogVO);
|
||||
}
|
||||
|
||||
public List<MberCertLoginLogVO> findAllCertLoginLogVO(MberCertLoginLogVO mberCertLoginLogVO) {
|
||||
return (List<MberCertLoginLogVO>) list("MberCertLoginLogVO.findAllCertLoginLogVO", mberCertLoginLogVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package itn.let.cert.ip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@ -75,4 +77,11 @@ public class CertLoginLogServiceImpl extends EgovAbstractServiceImpl implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MberCertLoginLogVO> findAllCertLoginLogVO(MberCertLoginLogVO mberCertLoginLogVO) {
|
||||
// TODO Auto-generated method stub
|
||||
return certLoginLogDAO.findAllCertLoginLogVO(mberCertLoginLogVO);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -41,6 +41,10 @@ import itn.com.cmm.util.MJUtil;
|
||||
import itn.com.cmm.util.RedirectUrlMaker;
|
||||
import itn.com.cmm.util.StringUtil;
|
||||
import itn.com.utl.fcc.service.EgovStringUtil;
|
||||
import itn.let.cert.ip.service.CertIpService;
|
||||
import itn.let.cert.ip.service.CertLoginLogService;
|
||||
import itn.let.cert.ip.service.MberCertIpVO;
|
||||
import itn.let.cert.ip.service.MberCertLoginLogVO;
|
||||
import itn.let.fax.user.service.FaxGroupDataVO;
|
||||
import itn.let.fax.user.service.FaxService;
|
||||
import itn.let.kakao.user.sent.service.KakaoSentService;
|
||||
@ -70,6 +74,7 @@ import itn.let.uss.umt.service.EgovMberManageService;
|
||||
import itn.let.uss.umt.service.EgovUserManageService;
|
||||
import itn.let.uss.umt.service.MberManageVO;
|
||||
import itn.let.uss.umt.service.UserManageVO;
|
||||
import itn.let.utl.sim.service.EgovClntInfo;
|
||||
import itn.let.utl.user.service.MjonNoticeSendUtil;
|
||||
|
||||
/**
|
||||
@ -164,6 +169,14 @@ public class EgovMypageController {
|
||||
/** 등급제 관리 서비스 */
|
||||
@Resource(name = "mberGrdService")
|
||||
MberGrdService mberGrdService;
|
||||
|
||||
// /* CertLoginLogService */
|
||||
@Resource(name = "CertLoginLogService")
|
||||
private CertLoginLogService certLoginLogService;
|
||||
|
||||
// /* CertLoginLogService */
|
||||
@Resource(name = "CertIpService")
|
||||
private CertIpService certIpService;
|
||||
|
||||
/**
|
||||
* 마이페이지 비밀번호 변경 탭
|
||||
@ -2927,13 +2940,58 @@ public class EgovMypageController {
|
||||
* 회원탈퇴 본인인증 화면
|
||||
*/
|
||||
@RequestMapping(value="/web/user/mberSecureLogin.do")
|
||||
public String secureLogin(@ModelAttribute MberManageVO mberManageVO
|
||||
public String secureLogin(@ModelAttribute("mberCertLoginLogVO") MberCertLoginLogVO mberCertLoginLogVO
|
||||
, ModelMap model, HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
|
||||
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
if(loginVO == null) {
|
||||
return "redirect:/web/user/login/login.do";
|
||||
}
|
||||
|
||||
//로그인 권한정보 불러오기
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
|
||||
|
||||
|
||||
mberCertLoginLogVO.setLoginId(userId);
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(mberCertLoginLogVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(mberCertLoginLogVO.getPageUnit());
|
||||
paginationInfo.setPageSize(mberCertLoginLogVO.getPageSize());
|
||||
|
||||
mberCertLoginLogVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
mberCertLoginLogVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
mberCertLoginLogVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
if("".equals(mberCertLoginLogVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
||||
mberCertLoginLogVO.setSearchSortCnd("LOGIN_DT");
|
||||
mberCertLoginLogVO.setSearchSortOrd("asc");
|
||||
}
|
||||
|
||||
|
||||
//전체 발송 리스트 불러오기
|
||||
List<MberCertLoginLogVO> resultList = certLoginLogService.findAllCertLoginLogVO(mberCertLoginLogVO);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("resultListCnt", resultList.size());
|
||||
|
||||
|
||||
paginationInfo.setTotalRecordCount( resultList.size()> 0 ? resultList.get(0).getTotCnt() : 0);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
|
||||
|
||||
|
||||
// 접속 IP
|
||||
String cennectIP = EgovClntInfo.getClntIP(request);
|
||||
model.addAttribute("cennectIP", cennectIP);
|
||||
|
||||
// 접속 IP가 등록되어있는지 확인
|
||||
MberCertIpVO mberCertIpVO = new MberCertIpVO();
|
||||
mberCertIpVO.setCertIp(cennectIP);
|
||||
mberCertIpVO.setMberId(userId);
|
||||
model.addAttribute("chkcertRegIP", certIpService.checkRegCertIp(mberCertIpVO));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
@ -2954,6 +3012,8 @@ public class EgovMypageController {
|
||||
AuthCertVO certVO = kmcCertCheck.authCertCheckNine(serverNm + "/web/user/selectSecurityAuthn.do", loginVO.getId());
|
||||
model.addAttribute("certVO", certVO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
model.addAttribute("pageTab", "mberSecureLogin");
|
||||
return "web/user/mberSecureLogin";
|
||||
@ -3773,12 +3833,17 @@ public class EgovMypageController {
|
||||
certVO.setCertNation(kmcVO.getNation());
|
||||
certVO.setCertName(kmcVO.getName());
|
||||
certVO.setCertResult(kmcVO.getResult());
|
||||
certVO.setCertType("KMC_회원정보 변경");
|
||||
certVO.setCertType("dddddddddddddddddddddd");
|
||||
certVO.setCertIpaddr(kmcVO.getIp());
|
||||
certVO.setBirthDay(kmcVO.getBirthDay());
|
||||
certVO.setSexdstnCode(kmcVO.getGender());
|
||||
|
||||
model.addAttribute("kmcVO", kmcVO);
|
||||
|
||||
//디비 테이블에 저장하기
|
||||
mberManageService.insertCertInfoLog(certVO);
|
||||
|
||||
|
||||
|
||||
|
||||
return "web/user/securityAuthnPage";
|
||||
}
|
||||
|
||||
@ -86,4 +86,33 @@
|
||||
|
||||
|
||||
|
||||
<select id="MberCertIpVO.checkCertIp" parameterClass="mberCertIpVO" resultClass="mberCertIpVO">
|
||||
/*MberCertIpVO.checkCertIp*/
|
||||
|
||||
select
|
||||
LOGIN_IP as certIp
|
||||
from lettngnrlmber_cert_login_log_ip
|
||||
where LOGIN_ID = #mberId#
|
||||
and CERT_IP = #certIp#
|
||||
union all
|
||||
select
|
||||
CERT_IP as certIp
|
||||
from lettngnrlmber_cert_ip
|
||||
where MBER_ID = #mberId#
|
||||
and CERT_IP = #certIp#
|
||||
AND CERT_USE_YN = 'Y'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="MberCertIpVO.checkRegCertIp" parameterClass="mberCertIpVO" resultClass="mberCertIpVO">
|
||||
/*MberCertIpVO.checkCennetIp*/
|
||||
|
||||
select
|
||||
CERT_IP as certIp
|
||||
from lettngnrlmber_cert_ip
|
||||
where MBER_ID = #mberId#
|
||||
and CERT_IP = #certIp#
|
||||
AND CERT_USE_YN = 'Y'
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
@ -8,6 +8,36 @@
|
||||
<typeAlias alias="mberCertLoginLogVO" type="itn.let.cert.ip.service.MberCertLoginLogVO"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="MberCertLoginLogVO.findAllCertLoginLogVO" resultClass="mberCertLoginLogVO" parameterClass="mberCertLoginLogVO">
|
||||
/*MberCertLoginLogVO.findAllCertLoginLogVO*/
|
||||
|
||||
|
||||
SELECT
|
||||
COUNT(CERT_LOGIN_ID) OVER() AS totCnt
|
||||
, CERT_LOGIN_ID as certLoginId
|
||||
, LOGIN_ID as loginId
|
||||
, LOGIN_IP as loginIp
|
||||
, LOGIN_DEVICE as loginDevice
|
||||
, DATE_FORMAT(LOGIN_DT,'%Y-%m-%d %T') as loginDt
|
||||
FROM LETTNGNRLMBER_CERT_LOGIN_LOG_IP
|
||||
WHERE 1=1
|
||||
and LOGIN_ID = #loginId#
|
||||
ORDER BY 1=1
|
||||
<isNotEmpty property="searchSortCnd">
|
||||
,$searchSortCnd$
|
||||
</isNotEmpty>
|
||||
<isNotEmpty property="searchSortOrd">
|
||||
$searchSortOrd$
|
||||
</isNotEmpty>
|
||||
|
||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="MberCertLoginLogVO.checkLoginIpExists" resultClass="int" parameterClass="mberCertLoginLogVO">
|
||||
SELECT COUNT(1)
|
||||
FROM LETTNGNRLMBER_CERT_LOGIN_LOG_IP
|
||||
|
||||
@ -500,10 +500,19 @@ function callTo() {
|
||||
alert("호출입니다.");
|
||||
}
|
||||
|
||||
function linkPage(pageNo){
|
||||
var listForm = document.listForm ;
|
||||
listForm.pageIndex.value = pageNo ;
|
||||
listForm.submit();
|
||||
}
|
||||
|
||||
//휴대푠 번호 등록 [끝]--------------------------------------------------------------------------------------------
|
||||
|
||||
</script>
|
||||
|
||||
<form name="listForm" action="<c:url value='/web/user/mberSecureLogin.do'/>" method="post">
|
||||
<input name="pageIndex" type="hidden" value="<c:out value='${mberCertLoginLogVO.pageIndex}'/>"/>
|
||||
</form>
|
||||
<div class="mask"></div>
|
||||
|
||||
<!-- 휴대폰인증 팝업 -->
|
||||
@ -579,8 +588,10 @@ function callTo() {
|
||||
<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>
|
||||
<span>현재 접속중인 IP : <b><c:out value="${cennectIP }"/> <c:if test="${chkcertRegIP }"> [허용 IP] </c:if> </b></span>
|
||||
<c:if test="${!chkcertRegIP }">
|
||||
<button type="button" class="btnType btnType6 btn_allow_ip_add">허용 IP 등록</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -726,62 +737,19 @@ function callTo() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach var="result" items="${resultList}" varStatus="status">
|
||||
<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>
|
||||
<td><c:out value="${result.loginDt}"/></td>
|
||||
<td><c:out value="${result.loginIp}"/></td>
|
||||
<td><c:out value="${result.loginDevice}"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- //로그인 내역 -->
|
||||
<!-- pagination -->
|
||||
<ul class="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>
|
||||
@ -796,8 +764,13 @@ function callTo() {
|
||||
<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 -->
|
||||
|
||||
</ul>pagination
|
||||
-->
|
||||
<c:if test="${!empty resultList}">
|
||||
<ul class="pagination">
|
||||
<ui:pagination paginationInfo = "${paginationInfo}" type="imageWeb" jsFunction="linkPage" />
|
||||
</ul>
|
||||
</c:if>
|
||||
</div>
|
||||
<!-- //보안로그인 -->
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user