전자조정시스템 고도화 커밋
- 관리자 로그인 OTP 문자인증 개발중
This commit is contained in:
parent
837c0fba33
commit
61c3b4bb29
@ -116,6 +116,10 @@ public class LoginVO implements Serializable{
|
||||
private String compTitle;
|
||||
|
||||
private String isSelect;
|
||||
/* 관리자 로그인 유형 001 : IP제어, 002 : OTP */
|
||||
private String loginTypeCd;
|
||||
|
||||
private String certNum = "";
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@ -402,6 +406,17 @@ public class LoginVO implements Serializable{
|
||||
public void setIsSelect(String isSelect) {
|
||||
this.isSelect = isSelect;
|
||||
}
|
||||
|
||||
public String getLoginTypeCd() {
|
||||
return loginTypeCd;
|
||||
}
|
||||
public void setLoginTypeCd(String loginTypeCd) {
|
||||
this.loginTypeCd = loginTypeCd;
|
||||
}
|
||||
public String getCertNum() {
|
||||
return certNum;
|
||||
}
|
||||
public void setCertNum(String certNum) {
|
||||
this.certNum = certNum;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -251,6 +251,8 @@ public class AdjReqMgrVO extends ComDefaultVO implements Serializable{
|
||||
*
|
||||
* */
|
||||
|
||||
private String smsSendSeq; // SMS 발송 로그 PK
|
||||
|
||||
public AdjReqMgrVO getAdrVO() {
|
||||
return adrVO;
|
||||
}
|
||||
@ -1185,6 +1187,13 @@ public class AdjReqMgrVO extends ComDefaultVO implements Serializable{
|
||||
public void setEmailSendResult(String emailSendResult) {
|
||||
this.emailSendResult = emailSendResult;
|
||||
}
|
||||
public String getSmsSendSeq() {
|
||||
return smsSendSeq;
|
||||
}
|
||||
public void setSmsSendSeq(String smsSendSeq) {
|
||||
this.smsSendSeq = smsSendSeq;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -38,4 +38,7 @@ public interface SMSOracleService {
|
||||
|
||||
// SMS 작성 메세지 전송(저작위 SMS서버 DB등록)
|
||||
public String insertSmsCustomSend(AdjReqMgrVO adjReqMgrVO) throws Exception;
|
||||
|
||||
// SMS OTP 인증번호 발송(저작위 SMS서버 DB등록)
|
||||
public String insertSmsOtpCertNumSend(AdjReqMgrVO adjReqMgrVO) throws Exception;
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import kcc.com.cmm.service.EgovProperties;
|
||||
import kcc.com.cmm.util.StringUtil2;
|
||||
@ -73,6 +74,9 @@ public class SMSOracleServiceImpl extends EgovAbstractServiceImpl implements SM
|
||||
//발송문구 관리
|
||||
@Resource(name = "MsgMgrDAO")
|
||||
private MsgMgrDAO msgMgrDAO;
|
||||
|
||||
@Resource(name = "adrSmsLogGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
|
||||
// 오라클 연동 테스트
|
||||
@ -650,10 +654,10 @@ public class SMSOracleServiceImpl extends EgovAbstractServiceImpl implements SM
|
||||
int bytes = adjReqMgrVO.getSendMsg().getBytes("euc-kr").length; // 발송메시지 바이트수
|
||||
|
||||
if (bytes > 90) {
|
||||
// sMSOracleDAO.insertMmsCustomSend(adjReqMgrVO); // SMS 등록 장문 > SMS DB(오라클)
|
||||
sMSOracleDAO.insertMmsCustomSend(adjReqMgrVO); // SMS 등록 장문 > SMS DB(오라클)
|
||||
adjReqMgrDAO.insertAdrMmsCustomSend(adjReqMgrVO); // SMS 이력 등록 장문 > 전자조정
|
||||
} else {
|
||||
// sMSOracleDAO.insertSmsCustomSend(adjReqMgrVO); // SMS 등록 단문 > SMS DB(오라클)
|
||||
sMSOracleDAO.insertSmsCustomSend(adjReqMgrVO); // SMS 등록 단문 > SMS DB(오라클)
|
||||
adjReqMgrDAO.insertAdrSmsCustomSend(adjReqMgrVO); // SMS 이력 등록 단문 > 전자조정
|
||||
}
|
||||
//sms 발송 관리 테이블에 저장
|
||||
@ -668,6 +672,64 @@ public class SMSOracleServiceImpl extends EgovAbstractServiceImpl implements SM
|
||||
LOGGER.debug("SMS 전송DB 등록 결과:[" + result +"]");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String insertSmsOtpCertNumSend(AdjReqMgrVO adjReqMgrVO) throws Exception {
|
||||
String result = "FAIL";
|
||||
try {
|
||||
/*
|
||||
* 1. adjReqMgrVO로 수신자(trPhone), 메시지(sendMsg), 사건번호(adrNo)를 파라미터로 받는다.
|
||||
* 2. 정해진 송신자, 시스템 구분자는 미리 정의된 globals.properties 에서 받는다.
|
||||
* 3. 저작위 SMS 발송 DB로 insert
|
||||
* 4. 발송 이력을 남긴다.
|
||||
*
|
||||
* */
|
||||
adjReqMgrVO.setTrId(trId); // 시스템 구분자
|
||||
adjReqMgrVO.setSendTelNo(sendTelNo); // 송신자 번호
|
||||
adjReqMgrVO.setSmsTy("000"); //문자 발송 문구 분류
|
||||
/*
|
||||
* smsTy
|
||||
* 000 - 관리자발송
|
||||
* 001 - 보완요청
|
||||
* 002 - 수수료납부요청
|
||||
* 003 - 조정접수
|
||||
* 004 - 기일통지서승인
|
||||
* 005 - 기일조서 결재완료
|
||||
* 006 - 조정조서 결재완료
|
||||
* 007 - 직권조정결정서 확인완료
|
||||
* 008 - 없음
|
||||
* 009 - 조정불성립
|
||||
*
|
||||
* */
|
||||
|
||||
int bytes = adjReqMgrVO.getSendMsg().getBytes("euc-kr").length; // 발송메시지 바이트수
|
||||
|
||||
if (bytes > 90) {
|
||||
sMSOracleDAO.insertMmsCustomSend(adjReqMgrVO); // SMS 등록 장문 > SMS DB(오라클)
|
||||
adjReqMgrDAO.insertAdrMmsCustomSend(adjReqMgrVO); // SMS 이력 등록 장문 > 전자조정
|
||||
} else {
|
||||
sMSOracleDAO.insertSmsCustomSend(adjReqMgrVO); // SMS 등록 단문 > SMS DB(오라클)
|
||||
adjReqMgrDAO.insertAdrSmsCustomSend(adjReqMgrVO); // SMS 이력 등록 단문 > 전자조정
|
||||
}
|
||||
//sms 발송 관리 테이블에 저장
|
||||
adjReqMgrVO.setRpplNm("");
|
||||
|
||||
String smsSendSeq = idgenService.getNextStringId();
|
||||
|
||||
adjReqMgrVO.setSmsSendSeq(smsSendSeq);
|
||||
|
||||
msgMgrDAO.insertAdrOtpCertNumSmsLog(adjReqMgrVO); // SMS 이력 등록 단문 > 전자조정
|
||||
|
||||
result = "SUCCESS";
|
||||
} catch (Exception e) {
|
||||
System.out.println("Exception Occured!!!");
|
||||
}
|
||||
|
||||
LOGGER.debug("SMS 전송DB 등록 결과:[" + result +"]");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
67
src/main/java/kcc/kccadr/kccadrCom/web/otpCertUtil.java
Normal file
67
src/main/java/kcc/kccadr/kccadrCom/web/otpCertUtil.java
Normal file
@ -0,0 +1,67 @@
|
||||
package kcc.kccadr.kccadrCom.web;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import kcc.let.uss.umt.service.UserManageVO;
|
||||
|
||||
public class otpCertUtil {
|
||||
|
||||
/**
|
||||
* @Method Name : mjonSmsCertCheck
|
||||
* @작성일 : 2022. 8. 25.
|
||||
* @작성자 : 이준호
|
||||
* @Method 설명 : 미허용 IP 관리자 페이지 로그인 시 SMS인증번호 체크
|
||||
*/
|
||||
public String otpCertUtil(String phone, String certNum, String mberId) throws Exception{
|
||||
// try {
|
||||
|
||||
UserManageVO userManageVO = new UserManageVO();
|
||||
|
||||
// userManageVO set
|
||||
userManageVO.setCertNum(certNum);
|
||||
userManageVO.setMoblphonNo(phone);
|
||||
userManageVO.setEmplyrId(mberId);
|
||||
|
||||
// // SendLogVO set
|
||||
// SendLogVO sendLogVO = new SendLogVO();
|
||||
// sendLogVO.setReceive(userManageVO.getMoblphonNo());
|
||||
//
|
||||
// // 인증번호 가져오기
|
||||
// sendLogVO = mjonMsgDataService.selectSysMsgLog(sendLogVO);
|
||||
// if (sendLogVO == null) {
|
||||
// return "empty";
|
||||
// } else {
|
||||
// // 시간 비교
|
||||
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
// Date nowdate = new Date();
|
||||
// Date compareDate = format.parse(sendLogVO.getFrstSendPnttm());
|
||||
//
|
||||
// Calendar cal = Calendar.getInstance();
|
||||
// cal.setTime(compareDate);
|
||||
// // 5분 추가
|
||||
// cal.add(Calendar.MINUTE, +5);
|
||||
//
|
||||
// compareDate = cal.getTime();
|
||||
//
|
||||
// // 인증번호을 발송한지 5분 이내일때
|
||||
// if (compareDate.after(nowdate)) {
|
||||
// UserManageVO checkUser = userManageService.selectAdminUserSmsCertCheck(userManageVO);
|
||||
//
|
||||
// if (checkUser != null) {
|
||||
// return "success";
|
||||
// } else {
|
||||
// return "checkNoFail";
|
||||
// }
|
||||
// } else {
|
||||
// return "timeOut";
|
||||
// }
|
||||
// }
|
||||
|
||||
// } catch (Exception e) {
|
||||
return "exception";
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
@ -74,4 +74,9 @@ public class MsgMgrDAO extends EgovAbstractDAO {
|
||||
|
||||
insert("MsgMgrDAO.insertAdrSmsCustomLog", adjReqMgrVO);
|
||||
}
|
||||
|
||||
public void insertAdrOtpCertNumSmsLog(AdjReqMgrVO adjReqMgrVO) throws Exception{
|
||||
|
||||
insert("MsgMgrDAO.insertAdrOtpCertNumSmsLog", adjReqMgrVO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,6 +66,17 @@ public class EgovLoginServiceImpl extends EgovAbstractServiceImpl implements
|
||||
|
||||
// 3. 결과를 리턴한다.
|
||||
if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
||||
// 사용자 로그인 타입(001 : IP제어, 002 : OTP) select 후 set
|
||||
String loginType = "";
|
||||
loginType = loginDAO.selectLoginType(loginVO.getId());
|
||||
|
||||
if(!"".equals(loginType)) {
|
||||
loginVO.setLoginTypeCd(loginType);
|
||||
}else {
|
||||
//로그인 타입이 없을경우 IP제어로 set
|
||||
loginVO.setLoginTypeCd("001");
|
||||
}
|
||||
|
||||
return loginVO;
|
||||
} else {
|
||||
loginVO = new LoginVO();
|
||||
|
||||
@ -129,4 +129,8 @@ public class LoginDAO extends EgovAbstractDAO {
|
||||
|
||||
}
|
||||
|
||||
public String selectLoginType(String str) throws Exception{
|
||||
return (String)select("loginDAO.selectLoginType", str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -63,7 +63,9 @@ import kcc.com.cmm.EgovMessageSource;
|
||||
import kcc.com.cmm.LoginVO;
|
||||
import kcc.com.cmm.captcha.CaptchaUtil;
|
||||
import kcc.com.cmm.spring.data.util.ProfileUtil;
|
||||
import kcc.com.cmm.util.StringUtil;
|
||||
import kcc.com.cmm.util.WebUtil;
|
||||
import kcc.kccadr.adjreqmgr.service.AdjReqMgrVO;
|
||||
import kcc.kccadr.cmm.service.SMSOracleService;
|
||||
import kcc.let.sym.log.clg.service.EgovLoginLogService;
|
||||
import kcc.let.sym.log.clg.service.LoginLog;
|
||||
@ -202,8 +204,9 @@ public class EgovLoginController {
|
||||
return "redirect:/cmm/main/mainPage.do";
|
||||
// initRsa(request);
|
||||
|
||||
//로그인 페이지 접근시 IP체크 제거_로그인 버튼 클릭 시 로그인 유형에 따라 체크로 변경_221011_이준호
|
||||
// 로그인 페이지 IP 체크
|
||||
List<LoginPolicyVO> loginPolicyGroupList = new ArrayList<LoginPolicyVO>();
|
||||
/*List<LoginPolicyVO> loginPolicyGroupList = new ArrayList<LoginPolicyVO>();
|
||||
LoginPolicyVO loginPolicyVOCheck = new LoginPolicyVO();
|
||||
String userIpCheck = EgovClntInfo.getClntIP(request);
|
||||
LOGGER.debug("userIpCheck: [" + userIpCheck + "]");
|
||||
@ -223,7 +226,7 @@ public class EgovLoginController {
|
||||
// 1. Spring Security 사용자권한 처리
|
||||
if (!ipCheck) {
|
||||
return "/cmm/error/ipFailure";
|
||||
}
|
||||
}*/
|
||||
if (!isAuthenticated) {
|
||||
// model.addAttribute("message",
|
||||
// egovMessageSource.getMessage("fail.common.login"));
|
||||
@ -512,6 +515,12 @@ public class EgovLoginController {
|
||||
// initRsa(request);
|
||||
return "uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
/*
|
||||
* OTP 문자인증을 위한 변수
|
||||
* */
|
||||
String authSelfId = loginVO.getId();
|
||||
String authSelfPw = loginVO.getPassword2();
|
||||
|
||||
|
||||
loginVO.setId(loginVO.getId());
|
||||
@ -536,6 +545,85 @@ public class EgovLoginController {
|
||||
// 1. 로그인 처리
|
||||
LoginVO resultVO = loginService.actionLogin(loginVO);
|
||||
|
||||
/*
|
||||
* 미허용 IP 인증번호 비교 flag
|
||||
* false : 인증번호 비교 결과 맞음
|
||||
* true : 인증번호 비교 결과 틀림
|
||||
*
|
||||
*/
|
||||
Boolean otpCertFlag = false;
|
||||
|
||||
// if(StringUtil.isNotEmpty(loginVO.getCertNum()) && "002".equals(resultVO.getLoginTypeCd())) {
|
||||
//
|
||||
// //수신자
|
||||
// String callTo = resultVO.getMoblphonNo();
|
||||
// String checkNo = loginVO.getCheckNo();
|
||||
// String mberId = resultVO.getId();
|
||||
//
|
||||
// /*
|
||||
// * 인증번호 비교
|
||||
// * return
|
||||
// * empty = "인증번호 발송 내역이 없습니다. 최고관리자에게 문의하세요."
|
||||
// * success = "5분이내 발송 내역 비교, 인증번호 비교 시 일치"
|
||||
// * smsCertFlag = true
|
||||
// * checkNoFail = "인증번호를 확인해 주세요"
|
||||
// * timeOut = "인증번호 시간이 초과되었습니다. \\n 인증번호를 다시 발송합니다."
|
||||
// * Exception = "에러가 발생하였습니다. 다시 시도해 주세요. \\n 에러가 지속될 시 최고관리자에게 문의하세요.";
|
||||
// * final = "exception";
|
||||
// *
|
||||
// * 실패 시 passMiss 숫자++ update
|
||||
// * loginService.updatePassMissPlus(loginVO);
|
||||
// *
|
||||
// * */
|
||||
// String result = otpCertUtil.otpCertUtil(callTo, checkNo, mberId);
|
||||
//
|
||||
// if(result.equals("empty")) {
|
||||
// loginService.updatePassMissPlus(loginVO);
|
||||
// model.addAttribute("message", "인증번호 발송 내역이 없습니다. 최고관리자에게 문의하세요.");
|
||||
// initRsa(request);
|
||||
// return "uat/uia/EgovLoginUsr";
|
||||
// } else if(result.equals("success")) {
|
||||
// smsCertFlag = true;
|
||||
// } else if(result.equals("checkNoFail")) {
|
||||
// loginService.updatePassMissPlus(loginVO);
|
||||
// model.addAttribute("message", "인증번호를 확인해 주세요");
|
||||
// model.addAttribute("message_auth", "미허용 IP에서 접속하셨습니다. \\n등록 된 휴대폰 번호로 발송된 인증번호를 입력해주세요.");
|
||||
// model.addAttribute("mode", "본인인증");
|
||||
// model.addAttribute("id", resultVO.getId());
|
||||
// model.addAttribute("password", authSelfPw);
|
||||
//
|
||||
// //인증문자 발송
|
||||
// mjonSmsCertSendUtil.mjonSmsCertSend(callTo);
|
||||
//
|
||||
// initRsa(request);
|
||||
// return "uat/uia/EgovLoginUsr";
|
||||
// } else if(result.equals("timeOut")) {
|
||||
// model.addAttribute("message", "인증번호 시간이 초과되었습니다. \\n 인증번호를 다시 발송합니다.");
|
||||
// model.addAttribute("message_auth", "미허용 IP에서 접속하셨습니다. \\n등록 된 휴대폰 번호로 발송된 인증번호를 입력해주세요.");
|
||||
// model.addAttribute("mode", "본인인증");
|
||||
// model.addAttribute("id", resultVO.getId());
|
||||
// model.addAttribute("password", authSelfPw);
|
||||
//
|
||||
// //인증문자 발송
|
||||
// mjonSmsCertSendUtil.mjonSmsCertSend(callTo);
|
||||
//
|
||||
// initRsa(request);
|
||||
// return "uat/uia/EgovLoginUsr";
|
||||
// } else if(result.equals("Exception")) {
|
||||
// model.addAttribute("message", "에러가 발생하였습니다. 다시 시도해 주세요. \\\\n 에러가 지속될 시 최고관리자에게 문의하세요.");
|
||||
// model.addAttribute("message_auth", "미허용 IP에서 접속하셨습니다. \\n등록 된 휴대폰 번호로 발송된 인증번호를 입력해주세요.");
|
||||
// model.addAttribute("mode", "본인인증");
|
||||
// model.addAttribute("id", resultVO.getId());
|
||||
// model.addAttribute("password", authSelfPw);
|
||||
//
|
||||
// //인증문자 발송
|
||||
// mjonSmsCertSendUtil.mjonSmsCertSend(callTo);
|
||||
//
|
||||
// initRsa(request);
|
||||
// return "uat/uia/EgovLoginUsr";
|
||||
// }
|
||||
// }
|
||||
//
|
||||
if (loginService.getUserAuth(resultVO) != null) {
|
||||
resultVO.setAuthority(loginService.getUserAuth(resultVO).getAuthority());
|
||||
}
|
||||
@ -556,40 +644,66 @@ public class EgovLoginController {
|
||||
}
|
||||
|
||||
// 2. 허용IP조회
|
||||
|
||||
boolean loginPolicyYn = false;
|
||||
// String userIp = EgovClntInfo.getClntIP(request);
|
||||
// 방화벽 아이피 조회
|
||||
|
||||
HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
|
||||
String userIp = req.getHeader("X-FORWARDED-FOR");
|
||||
if (userIp == null) {
|
||||
userIp = req.getRemoteAddr();
|
||||
}
|
||||
String userIp = EgovClntInfo.getClntIP(req);
|
||||
// String userIp = req.getHeader("X-FORWARDED-FOR");
|
||||
// if (userIp == null) {
|
||||
// userIp = req.getRemoteAddr();
|
||||
// }
|
||||
|
||||
System.out.println("--------userIp-------" + userIp + "-----------------");
|
||||
|
||||
LoginPolicyVO loginPolicyVO = new LoginPolicyVO();
|
||||
loginPolicyVO.setIpInfo(userIp);
|
||||
|
||||
boolean ipCheck = false;
|
||||
List<LoginPolicyVO> loginPolicyGroupList = new ArrayList<LoginPolicyVO>();
|
||||
loginPolicyGroupList = egovLoginPolicyService.selectLoginGroupPolicyAll(loginPolicyVO);
|
||||
if (loginPolicyGroupList != null) {
|
||||
for (LoginPolicyVO tempPolicyVO : loginPolicyGroupList) {
|
||||
if (userIp.contains(tempPolicyVO.getIpInfo().trim())) {
|
||||
ipCheck = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ipCheck) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
// 개발중 IP 유형 테스트
|
||||
// userIp = "123.456.789.000";
|
||||
|
||||
/*
|
||||
* 관리자 로그인 유형 추가_221011
|
||||
* loginTypeCd
|
||||
* 001 : IP제어
|
||||
* 002 : OTP
|
||||
* 1. IP제어 일 시 (001)
|
||||
* 기존 IP제어 로직
|
||||
* 2. OTP 일 시
|
||||
*
|
||||
* */
|
||||
|
||||
// IP 제어 로그인
|
||||
if("001".equals(resultVO.getLoginTypeCd())) {
|
||||
|
||||
LoginPolicyVO loginPolicyVO = new LoginPolicyVO();
|
||||
loginPolicyVO.setIpInfo(userIp);
|
||||
|
||||
boolean ipCheck = false;
|
||||
List<LoginPolicyVO> loginPolicyGroupList = new ArrayList<LoginPolicyVO>();
|
||||
loginPolicyGroupList = egovLoginPolicyService.selectLoginGroupPolicyAll(loginPolicyVO);
|
||||
if (loginPolicyGroupList != null) {
|
||||
for (LoginPolicyVO tempPolicyVO : loginPolicyGroupList) {
|
||||
if (userIp.contains(tempPolicyVO.getIpInfo().trim())) {
|
||||
ipCheck = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!ipCheck) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
// initRsa(request);
|
||||
return "uat/uia/EgovLoginUsr";
|
||||
return "uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// OTP 로그인
|
||||
else if("002".equals(resultVO.getLoginTypeCd()) && StringUtil.isEmpty(resultVO.getCertNum())){
|
||||
|
||||
model.addAttribute("mode","OTP");
|
||||
|
||||
model.addAttribute("message_auth", "미허용 IP에서 접속하셨습니다. \\n 휴대폰 번호를 입력 후 발송된 인증번호를 입력해주세요.");
|
||||
model.addAttribute("id", resultVO.getId());
|
||||
model.addAttribute("password", authSelfPw);
|
||||
|
||||
return "uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
// resultVO.siteId 의 각 로그인 ip를 조회함
|
||||
// if (resultVO != null && resultVO.getId() != null &&
|
||||
// !resultVO.getId().equals("") && loginPolicyYn) {
|
||||
@ -2165,6 +2279,25 @@ public class EgovLoginController {
|
||||
}
|
||||
return returnNode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* (관리자) OTP인증 인증번호 발송 Ajax
|
||||
*
|
||||
* @return model
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/uat/uia/otpCertSmsAjax.do")
|
||||
public ModelAndView otpCertSmsAjax(@ModelAttribute("adjReqMgrVO") AdjReqMgrVO adjReqMgrVO) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
|
||||
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -176,6 +176,10 @@ public class UserManageVO extends UserDefaultVO{
|
||||
|
||||
private String atchFileId; //첨부파일 아이디
|
||||
|
||||
private String loginTypeCd; // 로그인유형
|
||||
|
||||
private String certNum; // otp 인증번호
|
||||
|
||||
public String getAuthorCode() {
|
||||
return authorCode;
|
||||
}
|
||||
@ -705,6 +709,20 @@ public class UserManageVO extends UserDefaultVO{
|
||||
public void setAtchFileId(String atchFileId) {
|
||||
this.atchFileId = atchFileId;
|
||||
}
|
||||
public String getLoginTypeCd() {
|
||||
return loginTypeCd;
|
||||
}
|
||||
public void setLoginTypeCd(String loginTypeCd) {
|
||||
this.loginTypeCd = loginTypeCd;
|
||||
}
|
||||
public String getCertNum() {
|
||||
return certNum;
|
||||
}
|
||||
public void setCertNum(String certNum) {
|
||||
this.certNum = certNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -2753,7 +2753,18 @@
|
||||
<property name="cipers" value="16" />
|
||||
<property name="fillChar" value="0" />
|
||||
</bean>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- SMS Log idgen - adr_sms_send_mgr(PK) -->
|
||||
<bean name="adrSmsLogGnrService" class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" destroy-method="destroy">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="strategy" ref="adrSmsLogStrategy" />
|
||||
<property name="blockSize" value="10"/>
|
||||
<property name="table" value="IDS"/>
|
||||
<property name="tableName" value="ADR_SMS_SEND_MGR"/>
|
||||
</bean>
|
||||
<bean name="adrSmsLogStrategy" class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl">
|
||||
<property name="prefix" value="SMSSND_" />
|
||||
<property name="cipers" value="13" />
|
||||
<property name="fillChar" value="0" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@ -224,4 +224,13 @@
|
||||
|
||||
</insert>
|
||||
|
||||
<insert id="MsgMgrDAO.insertAdrOtpCertNumSmsLog" parameterClass="AdjReqMgrVO">
|
||||
|
||||
|
||||
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
</sqlMap>
|
||||
@ -399,4 +399,13 @@
|
||||
</isNotEqual>
|
||||
WHERE EMPLYR_ID = #id#
|
||||
</update>
|
||||
|
||||
<select id="loginDAO.selectLoginType" parameterClass="String" resultClass="String">
|
||||
|
||||
SELECT LOGIN_TYPE_CD AS loginTypeCd
|
||||
FROM LETTNEMPLYRINFO
|
||||
WHERE EMPLYR_ID = #id#
|
||||
|
||||
</select>
|
||||
|
||||
</sqlMap>
|
||||
|
||||
@ -203,7 +203,8 @@
|
||||
]]>
|
||||
</isEqual>
|
||||
</isNotEmpty>
|
||||
CRTFC_DN_VALUE )
|
||||
CRTFC_DN_VALUE,
|
||||
LOGIN_TYPE_CD )
|
||||
VALUES (
|
||||
#uniqId# ,
|
||||
#emplyrId# ,
|
||||
@ -242,7 +243,8 @@
|
||||
#snsId# ,
|
||||
#snsEmail# ,
|
||||
</isNotEmpty>
|
||||
#subDn# )
|
||||
#subDn#,
|
||||
#loginTypeCd# )
|
||||
</insert>
|
||||
|
||||
<!-- <insert id="userManageDAO.insertUser_GNR">
|
||||
@ -354,7 +356,8 @@
|
||||
AUTHOR_CODE authorCode ,
|
||||
ATCH_FILE_ID atchFileId,
|
||||
C.CODE_NM as emplyrSttusCodeTxt,
|
||||
USER_WORK AS userWork
|
||||
USER_WORK AS userWork,
|
||||
login_type_cd AS loginTypeCd
|
||||
FROM LETTNEMPLYRINFO A LEFT JOIN
|
||||
LETTNEMPLYRSCRTYESTBS B ON A.ESNTL_ID = B.SCRTY_DTRMN_TRGET_ID
|
||||
LEFT JOIN
|
||||
@ -443,7 +446,8 @@
|
||||
<isNotNull property="atchFileId">
|
||||
ATCH_FILE_ID = #atchFileId# ,
|
||||
</isNotNull>
|
||||
USER_NM = #emplyrNm#
|
||||
USER_NM = #emplyrNm# ,
|
||||
LOGIN_TYPE_CD = #loginTypeCd#
|
||||
WHERE ESNTL_ID = #uniqId#
|
||||
|
||||
</update>
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
<%@ taglib prefix="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %>
|
||||
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -403,6 +404,14 @@ function wrapWindowByMask(){
|
||||
<input name="password2" id="password2" title="비밀번호확인" type="password" size="50" maxlength="20" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="reqArea">로그인 유형</span></th>
|
||||
<td colspan="3">
|
||||
<div class="radio_wrap">
|
||||
<kc:radio codeId="CC051" name="loginTypeCd" id="loginTypeCd" selectedValue="001" css="style='margin-left: 10px;'"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span class="reqArea">이름</span></th>
|
||||
<td colspan="3">
|
||||
|
||||
@ -430,7 +430,7 @@ function authorChange(obj) {
|
||||
<div class="radio_wrap">
|
||||
<!-- <span><input type="radio" name="loginType" id="IP" class="radio2" value="IP"><label for="IP">IP제어</label></span>
|
||||
<span><input type="radio" name="loginType" id="OTP" class="radio2" value="OTP" checked><label for="OTP">OTP</label></span> -->
|
||||
<kc:radio codeId="CC051" name="loginType" id="loginType" selectedValue="002" />
|
||||
<kc:radio codeId="CC051" name="loginTypeCd" id="loginTypeCd" selectedValue="${userManageVO.loginTypeCd}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -24,8 +24,6 @@
|
||||
<meta http-equiv="Content-Language" content="ko">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>로그인</title>
|
||||
<!-- <link href="/css/post.css?ver=1" rel="stylesheet" > -->
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> -->
|
||||
<script src="/kccadrPb/usr/script/jquery-3.5.0.js"></script>
|
||||
<script type="text/javascript" src="/js/new_login.js"></script>
|
||||
|
||||
@ -36,19 +34,22 @@
|
||||
<link rel="stylesheet" href="/kccadrPb/adm/css/content.css">
|
||||
<link rel="stylesheet" href="/kccadrPb/adm/css/content_media.css">
|
||||
|
||||
|
||||
|
||||
<!-- 암화화 순서에 유의 -->
|
||||
<!-- <script type="text/javascript" src="/js/RSA/rsa.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/js/RSA/jsbn.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/js/RSA/prng4.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="/js/RSA/rng.js"></script> -->
|
||||
|
||||
<script type="text/javascript">
|
||||
<c:if test="${!empty message}">alert("${message}");</c:if>
|
||||
$( document ).ready(function(){
|
||||
|
||||
getid(document.loginForm);
|
||||
|
||||
/*
|
||||
* OTP 문자인증 노출 Script
|
||||
*/
|
||||
<c:if test="${mode == 'OTP'}">
|
||||
alert("${message_auth}");
|
||||
$("#id_text").val("${id}");
|
||||
$("#id_text").prop("readonly","readonly");
|
||||
$("#password_text").prop("readonly","readonly");
|
||||
// timer();
|
||||
</c:if>
|
||||
});
|
||||
|
||||
<kc:profile value="local">
|
||||
@ -87,6 +88,7 @@ function actionLogin() {
|
||||
// $("#password").val(rsa.encrypt(pw.val()));
|
||||
$("#id").val(id);
|
||||
$("#password").val(pw);
|
||||
$("#password2").val(pw);
|
||||
|
||||
document.loginForm.action="<c:url value='/uat/uia/actionSecurityLogin.do'/>";
|
||||
saveid(document.loginForm);
|
||||
@ -129,22 +131,34 @@ function getid(form){
|
||||
form.checkId.checked = ((form.id_text.value = getCookie("ncms_saveid")) != "");
|
||||
}
|
||||
|
||||
function otpPhoneView(obj){
|
||||
var target=$(obj).closest('.login_right_box');
|
||||
if(target.hasClass('login_right_otp_box')){
|
||||
target.removeClass('login_right_otp_box');
|
||||
}else{
|
||||
target.addClass('login_right_otp_box');
|
||||
}
|
||||
// OTP 문자인증 문자발송 Ajax
|
||||
function optCertNumSms(){
|
||||
|
||||
document.certForm.phone.value = document.loginForm.phone.value;
|
||||
|
||||
var data = new FormData(document.certForm);
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/uat/uia/otpCertSmsAjax.do",
|
||||
data: data,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
success: function (returnData, status) {
|
||||
console.log(returnData.result);
|
||||
if(returnData.result == 'SUCCESS'){
|
||||
}else{
|
||||
alert(returnData.message);
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("요청에 실패하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- <link href="/css/post.css" rel="stylesheet" type="text/css" /> -->
|
||||
<!-- <style>
|
||||
.login_left{position: relative;}
|
||||
.ncms_title{position: absolute;bottom: 30px;left: 60px;font-size: 17px;font-weight: 600;color: #fff;letter-spacing: 1px}
|
||||
caption, legend, label, .hidden {visibility:hidden;position:absolute;left:-9999em;width:1px;height:1px;margin:0;padding:0;background:none;font-size:0;line-height:0;text-indent:-9999em}
|
||||
</style> -->
|
||||
</head>
|
||||
<body>
|
||||
<form:form id="loginForm" name="loginForm" method="post">
|
||||
@ -153,6 +167,7 @@ function otpPhoneView(obj){
|
||||
<%-- <input type="hidden" id="RSAExponent" value="${RSAExponent}"/> --%>
|
||||
<input type="hidden" id="id" name="id">
|
||||
<input type="hidden" id="password" name="password">
|
||||
<input type="hidden" id="password2" name="password2">
|
||||
|
||||
<input name="j_username" type="hidden" />
|
||||
<div class="login_all_wrap">
|
||||
@ -160,13 +175,8 @@ function otpPhoneView(obj){
|
||||
<div class="login_left_box">
|
||||
<img src="/kccadrPb/adm/image/login_logo.png" alt="한국저작권위원회 KOREA COPYRIGHT COMMISSION">
|
||||
</div>
|
||||
<!--
|
||||
otp로그인 일 경우 login_right_otp_box 클래스가 추가시켜주시면 됩니다!
|
||||
or 로그인버튼 클릭시 otp로그인이면 클래스가 추가되면 됩니다!
|
||||
-->
|
||||
<div class="login_right_box">
|
||||
<div class="login_right_box login_right_otp_box">
|
||||
<p class="login_tit">로그인</p>
|
||||
<button type="button" style="position:relative;z-index:1;" onclick="otpPhoneView(this);return false;">인증번호영역 임시 버튼</button>
|
||||
<kc:profile value="local">
|
||||
아이디 선택 : <select id="devIdSelect" style="width: 400px; height: 30px;" onchange="login()">
|
||||
<option value="">로그인할 아이디를 선택해주세요.</option>
|
||||
@ -177,8 +187,6 @@ function otpPhoneView(obj){
|
||||
<option value="adradmin2">저작권위원회 관리자2(팀장)</option>
|
||||
<option value="adradmin3">저작권위원회 관리자3(부서장)</option>
|
||||
<option value="adradmin4">저작권위원회 관리자4(위원장)</option>
|
||||
|
||||
|
||||
</select>
|
||||
<br></br>
|
||||
</kc:profile>
|
||||
@ -190,19 +198,21 @@ function otpPhoneView(obj){
|
||||
<div class="pw_box">
|
||||
<p>PASSWORD</p>
|
||||
<label for="password_text"></label>
|
||||
<input type="password" id="password_text" placeholder="비밀번호를 입력해주세요." class="pw" onkeydown="javascript:if (event.keyCode == 13) { actionLogin();return false; }">
|
||||
</div>
|
||||
<div class="id_box otp_phone_box">
|
||||
<p>휴대폰번호</p>
|
||||
<label for="otp_phone_text"></label>
|
||||
<input type="text" name="otpPhone" id="otp_phone_text" placeholder="휴대폰번호를 입력해주세요." />
|
||||
<button type="button" class="otp_phone_btn">인증번호받기</button>
|
||||
</div>
|
||||
<div class="id_box otp_phone_box">
|
||||
<p>인증번호 입력</p>
|
||||
<label for="otp_phone_text"></label>
|
||||
<input type="text" name="otpPhone" id="otp_phone_text" placeholder="인증번호를 입력해주세요." />
|
||||
<input type="password" id="password_text" value="<c:out value='${password}'/>" placeholder="비밀번호를 입력해주세요." class="pw" onkeydown="javascript:if (event.keyCode == 13) { actionLogin();return false; }">
|
||||
</div>
|
||||
<c:if test="${mode eq 'OTP'}">
|
||||
<div class="id_box otp_phone_box">
|
||||
<p>휴대폰번호</p>
|
||||
<label for="phone"></label>
|
||||
<input type="text" name="phone" id="phone" placeholder="휴대폰번호를 입력해주세요." />
|
||||
<button type="button" class="otp_phone_btn">인증번호받기</button>
|
||||
</div>
|
||||
<div class="id_box otp_phone_box">
|
||||
<p>인증번호 입력</p>
|
||||
<label for="certNum"></label>
|
||||
<input type="text" name="certNum" id="certNum" placeholder="인증번호를 입력해주세요." />
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="saveId">
|
||||
<input type="checkbox" id="checkId" name="checkId">
|
||||
<label for="checkId">아이디저장</label>
|
||||
@ -218,5 +228,11 @@ function otpPhoneView(obj){
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
|
||||
<form id="certForm" name="certForm" method="post" action="">
|
||||
<input type="hidden" name="frstRegisterId" id="frstRegisterId" value="<c:out value='${id}'/>"/>
|
||||
<input type="hidden" name="phone" id="phone" value=""/>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
.login_wrap .submit_box input[type="submit"]{width: 180px; height: 50px; background-color: #ea5404; border-radius: 5px; color: #fff; font-size: 20px; font-weight: 500; border: 0; transition: background-color 0.2s ease-in-out;}
|
||||
.login_wrap .submit_box input[type="submit"]:hover{background-color: #de3900; transition: background-color 0.2s ease-in-out;}
|
||||
.login_wrap .copyright{font-size: 14px; position: absolute; bottom: 40px; color: #333;}
|
||||
.login_wrap .login_right_box .otp_phone_box {display:none;}
|
||||
/* .login_wrap .login_right_box .otp_phone_box {display:none;} */
|
||||
|
||||
.login_wrap .login_right_box.login_right_otp_box {padding-top:70px;}
|
||||
.login_wrap .login_right_box.login_right_otp_box .login_tit {margin-bottom:29px;}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user