Explorar o código

비밀번호 찾기 화면 개발 중

jsshin %!s(int64=5) %!d(string=hai) anos
pai
achega
77887c1700

+ 148 - 28
src/main/java/com/style24/front/biz/thirdparty/NiceCertify.java

@@ -1,5 +1,6 @@
 package com.style24.front.biz.thirdparty;
 
+import Kisinfo.Check.IPIN2Client;
 import NiceID.Check.CPClient;
 import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.util.GagaDateUtil;
@@ -31,6 +32,8 @@ public class NiceCertify {
 	@Autowired
 	private Environment env;
 
+	public static final String PROTOCOL = "http://";
+
 	private String niceId;			// 나이스휴대폰인증ID
 	private String nicePwd;			// 나이스휴대폰인증비밀번호
 	private String niceCallback;	// 나이스휴대폰인증콜백URL
@@ -67,7 +70,7 @@ public class NiceCertify {
 		log.info("sRequestNo: {}", sRequestNo);
 		TscSession.setAttribute("REQ_SEQ", sRequestNo);
 
-		String callback = GagaFileUtil.getConcatenationPath("http://" + TsfSession.getHttpServletRequest().getServerName(), niceCallback);
+		String callback = GagaFileUtil.getConcatenationPath(PROTOCOL + TsfSession.getHttpServletRequest().getServerName(), niceCallback);
 		log.info("niceCallback: {}", niceCallback);
 
 		String sAuthType = "M";	// 없으면 기본 선택화면, M: 휴대폰, C: 신용카드, X: 공인인증서
@@ -95,21 +98,22 @@ public class NiceCertify {
 		if (iRtn != 0) { // 실패했으면
 			String errorMsg = "[" + iRtn + "]";
 			if ( iRtn == -1) {
-				errorMsg = "암호화 시스템 에러입니다.";
+				errorMsg += "암호화 시스템 에러입니다.";
 			}
 			else if( iRtn == -2) {
-				errorMsg = "암호화 처리오류입니다.";
+				errorMsg += "암호화 처리오류입니다.";
 			}
 			else if( iRtn == -3) {
-				errorMsg = "암호화 데이터 오류입니다.";
+				errorMsg += "암호화 데이터 오류입니다.";
 			}
 			else if( iRtn == -9) {
-				errorMsg = "입력 데이터 오류입니다.";
+				errorMsg += "입력 데이터 오류입니다.";
 			}
 			else {
-				errorMsg = "알수 없는 에러 입니다.";
+				errorMsg += "알수 없는 에러 입니다.";
 			}
-			throw new IllegalStateException(errorMsg +"\n 안심본인인증을 사용할 수 없습니다.");
+			log.error("errorMsg : ===> {}" , errorMsg);
+			throw new IllegalStateException("안심본인인증을 사용할 수 없습니다.");
 		}
 
 		resultMap.setInt("iRtn", iRtn);
@@ -125,7 +129,7 @@ public class NiceCertify {
 	 * @author jsshin
 	 * @since 2021. 02. 05
 	 */
-	public GagaMap getCertifyResultInfo(Customer customer) {
+	public GagaMap getCertifyCellPhoneResultInfo(Customer customer) {
 		GagaMap resultMap = new GagaMap();
 		String sEncData = requestReplace(customer.getEncData(),"encodeData");
 
@@ -138,21 +142,22 @@ public class NiceCertify {
 		if (iRtn != 0) {
 			String errorMsg = "[" + iRtn + "]";
 			if (iRtn == -1) {
-				errorMsg = errorMsg + "복호화 시스템 오류입니다.";
+				errorMsg += "복호화 시스템 오류입니다.";
 			} else if (iRtn == -4) {
-				errorMsg = errorMsg + "복호화 처리 오류입니다.";
+				errorMsg += "복호화 처리 오류입니다.";
 			} else if (iRtn == -5) {
-				errorMsg = errorMsg + "복호화 해쉬 오류입니다.";
+				errorMsg += "복호화 해쉬 오류입니다.";
 			} else if (iRtn == -6) {
-				errorMsg = errorMsg + "복호화 데이터 오류입니다.";
+				errorMsg += "복호화 데이터 오류입니다.";
 			} else if (iRtn == -9) {
-				errorMsg = errorMsg + "입력 데이터 오류입니다.";
+				errorMsg += "입력 데이터 오류입니다.";
 			} else if (iRtn == -12) {
-				errorMsg = errorMsg + "사이트 패스워드 오류입니다.";
+				errorMsg += "사이트 패스워드 오류입니다.";
 			} else {
-				errorMsg = errorMsg + "결과값 확인 후, NICE신용평가정보 개발 담당자에게 문의";
+				errorMsg += "결과값 확인 후, NICE신용평가정보 개발 담당자에게 문의";
 			}
-			throw new IllegalStateException(errorMsg);
+			log.error("errorMsg : ===> {}" , errorMsg);
+			throw new IllegalStateException("안심본인인증을 사용할 수 없습니다.");
 		}
 
 
@@ -187,7 +192,7 @@ public class NiceCertify {
 		}
 
 		String sAdult = "";		 // 미성년 : 0, 성인 : 1
-		String foreignerYn = ""; // 외국인여부(외국인:Y)
+		String sforeignerYn = ""; // 외국인여부(외국인:Y)
 
 		if ("0".equals(sGender)) {
 			sGender = "F";
@@ -200,37 +205,152 @@ public class NiceCertify {
 		}
 
 		if ("0".equals(sNationalInfo)) {
-			foreignerYn = "N";
+			sforeignerYn = "N";
 		} else if ("1".equals(sNationalInfo)) {
-			foreignerYn = "Y";
+			sforeignerYn = "Y";
 		}
 
-		resultMap.setString("authType", sAuthType);
-		resultMap.setString("custNm", sName);
-		resultMap.setString("sexGb", sGender);
-		resultMap.setString("birthYmd", sBirthDate);
-		resultMap.setString("foreignerYn", foreignerYn);
+		resultMap.setString("sAuthType", sAuthType);
+		resultMap.setString("sName", sName);
+		resultMap.setString("sGender", sGender);
+		resultMap.setString("sBirthDate", sBirthDate);
+		resultMap.setString("sforeignerYn", sforeignerYn);
 		resultMap.setString("sDi", sDi);
 		resultMap.setString("sCi", sCi);
-		resultMap.setString("cellPhnno", sMobileNo);
+		resultMap.setString("sMobileNo", sMobileNo);
 		resultMap.setString("sMobileCo", sMobileCo);
-		resultMap.setString("adult", sAdult);
+		resultMap.setString("sAdult", sAdult);
 
 		return resultMap;
 	}
 
+	/**
+	 * 아이핀 인증 요청
+	 * @return GagaMap
+	 * @author jsshin
+	 * @since 2021. 02. 09
+	 */
 	public GagaMap certifyIpin() {
 		IPIN2Client ipinClinet = new IPIN2Client();
-		String Callback = GagaFileUtil.getConcatenationPath("https://" + TsfSession.getHttpServletRequest().getServerName(), ipinCallback);
+		String callback = GagaFileUtil.getConcatenationPath( PROTOCOL + TsfSession.getHttpServletRequest().getServerName(), ipinCallback);
+
 		String sCPRequestNo = ipinClinet.getRequestNO(ipinId);
+		TscSession.setAttribute("CPREQUEST", sCPRequestNo);
 
-		int iRtn = ipinClinet.fnRequest(ipinId, ipinPwd, sCPRequestNo, Callback);
+		// 인증요청 암호화 데이터 생성
+		int iRtn = ipinClinet.fnRequest(ipinId, ipinPwd, sCPRequestNo, callback);
 
 		if (iRtn != 0) { // 실패했으면
+			String errorMsg = "[" + iRtn + "]";
+			if (iRtn == -1) {
+				errorMsg += "암호화 시스템 오류 : 귀사 서버 환경에 맞는 모듈을 이용해주십시오." +
+						"<br>오류가 지속되는 경우 iRtn 값, 서버 환경정보, 사이트코드를 기재해 문의주시기 바랍니다.";
+			} else if (iRtn == -2) {
+				errorMsg += "암호화 처리 오류 : 최신 모듈을 이용해주십시오. " +
+						"오류가 지속되는 경우 iRtn 값, 서버 환경정보, 사이트코드를 기재해 문의주시기 바랍니다.";
+			} else if (iRtn == -9) {
+				errorMsg += "입력 정보 오류 : 암호화 함수에 입력된 파라미터 값을 확인해주십시오." +
+						"<br>오류가 지속되는 경우, 함수 실행 직전 각 파라미터 값을 로그로 출력해 발송해주시기 바랍니다.";
+			} else {
+				errorMsg += "기타 오류: iRtn 값과 적용한 샘플소스를 발송해주시기 바랍니다.";
+			}
+			log.error("errorMsg : ===> {}" , errorMsg);
 			throw new IllegalStateException("안심본인인증을 사용할 수 없습니다.");
 		}
+
 		GagaMap resultMap = new GagaMap();
 		resultMap.setString("sEncData", ipinClinet.getCipherData());
+
+		return resultMap;
+	}
+
+	/**
+	 * 아이핀 인증 결과값
+	 * @param customer - 인증정보
+	 * @return GagaMap
+	 * @author jsshin
+	 * @since 2020. 7. 15
+	 */
+	public GagaMap getCertifyIpinResultInfo(Customer customer) {
+		GagaMap resultMap = new GagaMap();
+		String sEncData = requestReplace(customer.getEncData(), "encodeData");
+
+		if (StringUtils.isBlank(sEncData)) {
+			throw new IllegalStateException("안심본인인증을 사용할 수 없습니다.");
+		}
+
+		IPIN2Client ipinClinet = new IPIN2Client();
+		int iRtn = ipinClinet.fnResponse(ipinId, ipinPwd, sEncData);
+
+		if (iRtn != 1) {
+			String errorMsg = "[" + iRtn + "]";
+			if (iRtn == -1 || iRtn == -4) {
+				errorMsg +=  "복호화 시스템 오류 :<br> 귀사 서버 환경에 맞는 모듈을 이용해주십시오." +
+						"<br>오류가 지속되는 경우 iRtn 값, 서버 환경정보, 사이트코드를 기재해 문의주시기 바랍니다.";
+			} else if (iRtn == -6){
+				errorMsg +=  "복호화 처리 오류: 당사에서 이용하는 charset인 EUC-KR이 정상적으로 받아지는 확인해주십시오. " +
+						"<br>오류가 지속되는 경우, 개발 가이드의 <b>\"결과 데이터 확인 방법\"</b>을 참고해주시기 바랍니다.";
+			} else if (iRtn == -9) {
+				errorMsg +=  "입력 정보 오류: 복호화 함수에 입력된 파라미터 값을 확인해주십시오." +
+						"<br>오류가 지속되는 경우, 함수 실행 직전 각 파라미터 값을 로그로 출력해 발송해주시기 바랍니다.";
+			} else if (iRtn == -12) {
+				errorMsg += "CP 패스워드 불일치: IPIN 서비스 사이트패스워드를 확인해주시기 바랍니다.";
+			} else if (iRtn == -13) {
+				errorMsg += "CP 요청번호 불일치: 세션에 저장된 CP요청번호(sCPRequest) 값을 확인해주시기 바랍니다.";
+			} else {
+				errorMsg += "기타오류: iRtn 값 확인 후 NICE평가정보 전산 담당자에게 문의해주시기 바랍니다.";
+			}
+
+			log.error("errorMsg : ===> {}" , errorMsg);
+			throw new IllegalStateException("안심본인인증을 사용할 수 없습니다.");
+		}
+
+		String sVirtualNo = ipinClinet.getVNumber();		// 가상주민번호 (13자리이며, 숫자 또는 문자
+		String sName = ipinClinet.getName();				// 이름 (EUC-KR)
+		String sAgeCode = ipinClinet.getAgeCode();			// 연령대 코드 (개발 가이드 참조)
+		String sGenderCode = ipinClinet.getGenderCode();	// 성별 코드 (0:여성, 1: 남성)
+		String sBirthDate = ipinClinet.getBirthDate();		// 생년월일 (YYYYMMDD)
+		String sForeigner = ipinClinet.getNationalInfo();	// 내/외국인코드 (0:내국인, 1:외국인)
+		String sCPRequestNum = ipinClinet.getCPRequestNO();	// CP 요청번호
+		String sDupInfo = ipinClinet.getDupInfo();			// 중복가입확인값 (64byte, 개인식별값, DI:Duplicate Info)
+		String sConnInfo = ipinClinet.getCoInfo1();			// 연계정보 확인값 (88byte, 개인식별값, CI:Connecting Information)
+		String sCIUpdate = ipinClinet.getCIUpdate();		// CI 갱신정보 (1~: 가이드 참조)
+		String sAuthInfo = ipinClinet.getAuthInfo();		// 본인확인수단 (0~4: 가이드 참조)
+
+
+		String sCPRequestNo = TscSession.getAttribute("CPREQUEST");
+		if (!sCPRequestNo.equals(sCPRequestNum)) {
+			throw new IllegalStateException("세션값 불일치 오류 입니다.");
+		}
+
+		String sGender = "";
+		String sAdult = "N"; //미성년자
+		String sforeignerYn = "";
+
+		if (Integer.parseInt(sAgeCode) > 3) {
+			sAdult = "Y";//성인
+		}
+		if ("0".equals(sGenderCode)) {
+			sGender = "F";
+		} else if ("1".equals(sGenderCode)) {
+			sGender = "M";
+		}
+
+		if ("0".equals(sForeigner)) {
+			sforeignerYn = "N";
+		} else if ("1".equals(sForeigner)) {
+			sforeignerYn = "Y";
+		}
+
+		resultMap.setString("sVirtualNo", sVirtualNo);
+		resultMap.setString("sName", sName);
+		resultMap.setString("sGender", sGender);
+		resultMap.setString("sBirthDate", sBirthDate);
+		resultMap.setString("sforeignerYn", sforeignerYn);
+		resultMap.setString("sDupInfo", sDupInfo);
+		resultMap.setString("sConnInfo", sConnInfo);
+		resultMap.setString("sAdult", sAdult);
+
 		return resultMap;
 	}
 

+ 108 - 15
src/main/java/com/style24/front/biz/web/TsfCustomerController.java

@@ -4,6 +4,7 @@ import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.util.GagaStringUtil;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.session.TscSession;
+import com.style24.front.biz.thirdparty.NiceCertify;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.domain.Customer;
 import org.apache.commons.lang3.StringUtils;
@@ -40,6 +41,9 @@ public class TsfCustomerController extends TsfBaseController {
 	@Autowired
 	private TsfCustomerService customerService;
 
+	@Autowired
+	private NiceCertify niceCertify;
+
 	/**
 	 * 아이디 찾기 화면
 	 *
@@ -68,38 +72,127 @@ public class TsfCustomerController extends TsfBaseController {
 	public GagaMap getIdFind(@RequestBody Customer customer) {
 		GagaMap result = new GagaMap();
 		boolean isFind = false;
-		Customer custInfo = customerService.getCustomerFindId(customer);
+
+		if (StringUtils.isBlank(customer.getAuthMethod())) {
+			throw new IllegalStateException("인증방법이 없습니다. <br>관리자에게 문의하시기 바랍니다.");
+		}
+
+		Customer params = new Customer();
+		// 인증방법
+		 GagaMap authInfo = null;
+		if (TscConstants.AuthMethod.CUSTINFO.value().equals(customer.getAuthMethod())) {
+			// 기본정보
+			params.setCustNm(customer.getCustNm());
+			params.setEmail(customer.getEmail());
+			params.setBirthYmd(customer.getBirthYmd());
+		} else if (TscConstants.AuthMethod.MOBILE.value().equals(customer.getAuthMethod())) {
+			// 핸드폰 인증
+			authInfo = niceCertify.getCertifyCellPhoneResultInfo(customer);
+			params.setCi(authInfo.getString("sCi"));
+		} else if (TscConstants.AuthMethod.IPIN.value().equals(customer.getAuthMethod())) {
+			// 아이핀
+			authInfo = niceCertify.getCertifyIpinResultInfo(customer);
+			params.setCi(authInfo.getString("sConnInfo"));
+		}
+
+		// 고객정보 찾기
+		Customer custInfo = customerService.getCustomerFindId(params);
 		if (custInfo != null) {
 			isFind = true;
+			result.setString("maskingCustId", custInfo.getMaskingCustId());
+			result.setString("joinDt", custInfo.getJoinDt());
+			result.setString("ysJoinDt", custInfo.getYsJoinDt());
+			result.setString("nvJoinDt", custInfo.getNvJoinDt());
+			result.setString("kkJoinDt", custInfo.getKkJoinDt());
 		}
-
-		result.setString("authType",customer.getAuthType()); // 화면에서 받은 인증방법
-		result.setString("maskingCustId", custInfo.getMaskingCustId());
-		result.setString("joinDt", custInfo.getJoinDt());
-		result.setString("ysJoinDt", custInfo.getYsJoinDt());
-		result.setString("nvJoinDt", custInfo.getNvJoinDt());
-		result.setString("kkJoinDt", custInfo.getKkJoinDt());
+		result.setString("authMethod", customer.getAuthMethod()); // 인증방법
 		result.setBoolean("isFind", isFind);
 		return result;
 	}
 
 	/**
-	 * 아이디 찾기 결과 화면
-	 *
-	 * @param confirmYn - 인증여부
+	 * 휴대폰 인증 화면
+	 * @param redirectUrl - 모바일사용
+	 * @param custparams - 회원정보 수정시 사용
 	 * @return ModelAndView
 	 * @author jsshin
-	 * @since 2021. 02. 05
+	 * @since 2021. 02. 09
 	 */
-	@GetMapping("/id/find/result/form")
-	public ModelAndView idFindResult(@RequestParam(required = false) String confirmYn) {
+	@GetMapping("/nice/cellphone/form")
+	public ModelAndView niceCellphoneForm(@RequestParam(value = "redirectUrl", required = false) String redirectUrl
+			, @RequestParam(value = "custparams", required = false) String custparams) {
 		ModelAndView mav = new ModelAndView();
+		GagaMap result = niceCertify.certifyCellPhone();
+
+		if ("M".equals(TsfSession.getFrontGb())) {
+			mav.addObject("redirectUrl", redirectUrl); // 모바일만 사용
+		}
 
-		mav.setViewName(super.getDeviceViewName("customer/FindIdResultForm"));
+		mav.addObject("sEncData", result.getString("sEncData"));
+		mav.setViewName(super.getDeviceViewName("customer/NiceCellPhoneForm"));
 
 		return mav;
 	}
 
+	/**
+	 * 아이핀 인증 화면
+	 * @param redirectUrl - 모바일사용
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 02. 09
+	 */
+	@GetMapping("/nice/ipin/form")
+	public ModelAndView getCertifyNiceIpin(@RequestParam(value = "redirectUrl", required = false) String redirectUrl) {
+		ModelAndView mav = new ModelAndView();
+		GagaMap result = niceCertify.certifyIpin();
+
+
+		if ("M".equals(TsfSession.getFrontGb())) {
+			mav.addObject("redirectUrl", redirectUrl); // 모바일만 사용
+		}
+
+		mav.addObject("sEncData", result.getString("sEncData"));
+		mav.setViewName(super.getDeviceViewName("customer/NiceIpinForm"));
+		return mav;
+	}
+
+	/**
+	 * 나이스 인증 콜백
+	 * @param encodeData - 휴대폰인증에서 전달받은 인증결과 암호화 데이터 취득
+	 * @param encData - ipin_process에서 전달받은 인증결과 암호화 데이터 취득
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 02. 09
+	 */
+	@RequestMapping("/nice/certify/callback")
+	public ModelAndView niceCertifyCallback(
+			@RequestParam(value = "EncodeData", required = false) String encodeData
+			, @RequestParam(value = "enc_data", required = false) String encData
+			, @RequestParam(value = "param_r1", required = false) String redirectUrl) {
+
+		ModelAndView mav = new ModelAndView(super.getDeviceViewName("customer/NiceCallbackForm"));
+		String sEncData = "";
+		String authMethod = "";
+		if (StringUtils.isNotBlank(encodeData)) {
+			sEncData = encodeData;
+			authMethod = TscConstants.AuthMethod.MOBILE.value();
+		}
+		if (StringUtils.isNotBlank(encData)) {
+			sEncData = encData;
+			authMethod = TscConstants.AuthMethod.IPIN.value();
+		}
+
+		if ("M".equals(TsfSession.getFrontGb())) {
+			mav.addObject("redirectUrl", redirectUrl);
+		}
+
+		mav.addObject("sEncData", sEncData);
+		mav.addObject("authMethod", authMethod);
+
+		return mav;
+	}
+
+
 	/**
 	 * 비밀번호 찾기 화면
 	 *

+ 86 - 64
src/main/webapp/WEB-INF/views/web/customer/FindIdFormWeb.html

@@ -32,8 +32,8 @@
 					</div>
 					<div class="registration_nav">
 						<ul>
-							<li class="active"><a href="javascript:void(0)">아이디 찾기</a></li>
-							<li><a href="javascript:void(0)">비밀번호 찾기</a></li>
+							<li class="active"><a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_CUSTOMER_ID_FIND);">아이디 찾기</a></li>
+							<li><a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_CUSTOMER_PWD_FIND);">비밀번호 찾기</a></li>
 						</ul>
 					</div>
 					<div class="registration_tap">
@@ -60,7 +60,7 @@
 													<label class="input_label sr-only">이름</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="custNm" placeholder="이름" class="form_control" maxlength="30"/>
+															<input type="text" id="custNm" name="custNm" placeholder="이름" class="form_control" maxlength="30"/>
 														</div>
 													</div>
 												</div>
@@ -68,7 +68,7 @@
 													<label class="input_label sr-only">생년월일 8자리 (예:19880912)</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="birthYmd" placeholder="생년월일 8자리 (예:19880912)" class="form_control" maxlength="8" data-valid-type="numeric"/>
+															<input type="text" id="birthYmd" name="birthYmd" placeholder="생년월일 8자리 (예:19880912)" class="form_control" maxlength="8" data-valid-type="numeric"/>
 														</div>
 													</div>
 												</div>
@@ -76,7 +76,7 @@
 													<label class="input_label sr-only">이메일</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="email" placeholder="이메일" class="form_control" maxlength="30"/>
+															<input type="text" id="email" name="email" placeholder="이메일" class="form_control" maxlength="30"/>
 														</div>
 													</div>
 												</div>
@@ -91,54 +91,50 @@
 										</form>
 									</li>
 									<li>
-										<form id="certifyPhone" name="certifyPhone" class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">휴대폰 본인인증으로 찾기</span>
-														</div>
+										<div class="fold_head">
+											<a href="javascript:void(0)">
+												<div>
+													<div class="fold_tit" style="width: inherit;">
+														<span style="width: inherit;">휴대폰 본인인증으로 찾기</span>
 													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>회원님의 명의로 등록된 휴대폰으로 본인확인을 진행합니다.</p>
 												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button type="button" id="btnPhoneConfirm" class="btn btn_dark btn_block">
-															<span>본인명의 휴대폰으로 인증</span>
-														</button>
-													</div>
+											</a>
+										</div>
+										<div class="fold_cont">
+											<div class="txt">
+												<p>회원님의 명의로 등록된 휴대폰으로 본인확인을 진행합니다.</p>
+											</div>
+											<div class="ui_row mt20">
+												<div class="ui_col_12">
+													<button type="button" id="btnCellPhoneCertify" class="btn btn_dark btn_block">
+														<span>본인명의 휴대폰으로 인증</span>
+													</button>
 												</div>
 											</div>
-										</form>
+										</div>
 									</li>
 									<li>
-										<form id="certifyIpin" name="certifyIpin" class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">아이핀 인증으로 찾기</span>
-														</div>
+										<div class="fold_head">
+											<a href="javascript:void(0)">
+												<div>
+													<div class="fold_tit" style="width: inherit;">
+														<span style="width: inherit;">아이핀 인증으로 찾기</span>
 													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>아이핀 인증을 통해 찾을 수 있습니다.</p>
 												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button type="button" id="btnIpinConfirm" class="btn btn_dark btn_block">
-															<span>아이핀 인증</span>
-														</button>
-													</div>
+											</a>
+										</div>
+										<div class="fold_cont">
+											<div class="txt">
+												<p>아이핀 인증을 통해 찾을 수 있습니다.</p>
+											</div>
+											<div class="ui_row mt20">
+												<div class="ui_col_12">
+													<button type="button" id="btnIpinCertify" class="btn btn_dark btn_block">
+														<span>아이핀 인증</span>
+													</button>
 												</div>
 											</div>
-										</form>
+										</div>
 									</li>
 								</ul>
 							</div>
@@ -185,12 +181,12 @@
 								</div>
 								<div class="btn_group_block btn_group_md ui_row">
 									<div class="ui_col_6">
-										<button type="button" class="btn btn_primary btn_block">
+										<button type="button" class="btn btn_primary btn_block" onclick="cfnGoToPage(_PAGE_CUSTOMER_JOIN);">
 											<span>회원가입</span>
 										</button>
 									</div>
 									<div class="ui_col_6">
-										<button type="button" class="btn btn_dark btn_block">
+										<button type="button" class="btn btn_dark btn_block" onclick="cfnGoToPage(_PAGE_CUSTOMER_ID_FIND);">
 											<span>다시 찾기</span>
 										</button>
 									</div>
@@ -198,7 +194,7 @@
 							</div>
 							<!-- //회원정보로 아이디찾기 실패일경우 -->
 							<!-- 휴대폰,아이핀 본인인증으로 아이디찾기 실패일경우 -->
-							<div id="failCertification" class="find_result clear" style="display: none;">
+							<div id="failAuthentication" class="find_result clear" style="display: none;">
 								<div class="form_info">
 									<span class="ico_content_none"></span>
 									<p>입력한 정보와 일치하는 아이디가 존재하지 않습니다.</p>
@@ -208,7 +204,7 @@
 								</div>
 								<div class="btn_group_block btn_group_md ui_row">
 									<div class="ui_col_12">
-										<button class="btn btn_primary btn_block">
+										<button type="button" class="btn btn_primary btn_block" onclick="cfnGoToPage(_PAGE_CUSTOMER_JOIN);">
 											<span>회원가입</span>
 										</button>
 									</div>
@@ -244,27 +240,46 @@
 			alert('이메일 형식에 맞게 입력해주세요.');
 			return;
 		}
-		custInfo.authType = 'custInfo';
+		custInfo.authMethod = 'custInfo';
 
 		let jsonData = JSON.stringify(custInfo);
-		console.log('jsonData', jsonData);
+		//console.log('jsonData', jsonData);
 		ajaxJsonSubmit('/customer/id/find', jsonData, fnInfoConfirmCallBack);
 	});
 
+	// 휴대폰 인증
+	$('#btnCellPhoneCertify').on('click', function () {
+		cfnOpenCellphoneCertify();
+	});
+
+	// 아이핀 인증
+	$('#btnIpinCertify').on('click', function () {
+		cfnOpenIpinCertify();
+	});
+
+	// 나이스 본인인증 후 콜백
+	var fnNiceCallBack = function(encData, authMethod) {
+		if (!gagajf.isNull(encData)) {
+			let custInfo = {};
+			custInfo.encData = encData;
+			custInfo.authMethod = authMethod;
+			let jsonData = JSON.stringify(custInfo);
+			ajaxJsonSubmit('/customer/id/find', jsonData, fnInfoConfirmCallBack)
+		}
+	};
 
-	// 찾기 결과
+	// 찾기결과
 	var fnInfoConfirmCallBack = function (result) {
-		console.log(result);
 		$('#searchDiv').hide();
-		// 1. 성공여부
 		if (result.isFind) {
-			fnDataBinding(result.authType, result, result.isFind);
+			fnGetDisplaySucc(result.authMethod, result);
 		} else {
-			fnDataBinding(result.authType, result, result.isFind);
+			fnGetDisplayFail(result.authMethod);
 		}
 	};
 
-	var fnDataBinding = function (authType, custInfo, isFind) {
+	// 찾기성공
+	var fnGetDisplaySucc = function (authMethod, custInfo) {
 		$('#resultId').text(custInfo.maskingCustId);
 		$('#joinDt').text(toDateFormat(custInfo.joinDt).replaceAll('-','.'));
 		let joinPath = fnSnsJoinPath(custInfo); // 가입경로 : 직접이면 표시 안함, 간편가입 연동 표시
@@ -272,16 +287,23 @@
 			$('#liJoinPath').show();
 			$('#joinPath').text(joinPath);
 		}
-		if (authType === 'custInfo') {
-			if (isFind) {
-				$('#succeedCustId').show();
-			} else {
-				$('#failCustId').show();
-			}
-		}
+		$('#succeedCustId').show();
 
-	}
+	};
+
+	// 찾기실패
+	var fnGetDisplayFail = function (authMethod) {
+		$('.form_head').hide();
+		$('.registration_nav').hide();
+		if (authMethod === 'custInfo') {
+			$('#failCustId').show();
+		}
+		if (authMethod === 'mobile' || authMethod === 'ipin') {
+			$('#failAuthentication').show();
+		}
+	};
 
+	// 가입경로
 	var fnSnsJoinPath = function (custInfo) {
 		let snsType = '';
 		if (!gagajf.isNull(custInfo.ysJoinDt)) {
@@ -300,7 +322,7 @@
 			snsType += '카카오로 연동';
 		}
 		return snsType;
-	}
+	};
 
 
 	// 이메일 체크

+ 0 - 96
src/main/webapp/WEB-INF/views/web/customer/FindIdResultFormWeb.html

@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html lang="ko"
-	xmlns:th="http://www.thymeleaf.org"
-	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
-	layout:decorator="web/common/layout/DefaultLayoutWeb">
-<!--
- *******************************************************************************
- * @source  : FindIdResultFormWeb.html
- * @desc    : 아이디 찾기 결과 안내 Page
- *============================================================================
- * STYLE24
- * Copyright(C) 2021 TSIT, All rights reserved.
- *============================================================================
- * VER  DATE         AUTHOR      DESCRIPTION
- * ===  ===========  ==========  =============================================
- * 1.0  2021.02.05   jsshin     최초 작성
- *******************************************************************************
- -->
-<body>
-
-<th:block layout:fragment="content">
-<div id="container" class="container mb">
-	<div class="wrap">
-		<div class="content find_complete"> <!-- 페이지특정 클래스 = find_complete -->
-			<div class="cont_head">
-				<h3>style24</h3>
-			</div>
-			<div class="cont_body">
-				<div class="form_wrap form_col_c">
-					<div class="form_head">
-						<h4>아이디&#47;비밀번호 찾기</h4>
-					</div>
-					<!-- 아이디찾기 성공일경우 -->
-					<div class="find_result clear">
-						<div class="form_info">
-							<span class="ico_content_find"></span>
-							<p>아이디 찾기 결과 안내</p>
-						</div>
-						<div class="form_print_bar mt40">
-							<ul>
-								<li>
-									<span class="t_span">아이디</span>
-									<span class="c_primary bold" data-font="lato">I***D1</span>
-								</li>
-								<li>
-									<span class="t_span">가입일자</span>
-									<span class="bold" data-font="lato">2020.12.22</span>
-								</li>
-								<li>
-									<span class="t_span">가입경로</span>
-									<span class="bold" data-font="lato">YES24 연동</span>
-								</li>
-							</ul>
-						</div>
-						<div class="btn_group_block btn_group_md ui_row">
-							<div class="ui_col_12">
-								<button class="btn btn_dark btn_block"><span>로그인 하기</span></button>
-							</div>
-						</div>
-					</div>
-					<!-- //아이디찾기 성공일경우 -->
-					<!-- 회원정보로 아이디찾기 실패일경우 -->
-					<div class="find_result clear">
-						<div class="form_info">
-							<span class="ico_content_none"></span>
-							<p>입력한 정보와 일치하는 아이디가 존재하지 않습니다.</p>
-							<p class="t_info mt10">
-								정확한 확인을 위해 휴대폰 인증/아이핀 인증을 통한<br>아이디 찾기를 진행해 주세요.
-							</p>
-						</div>
-						<div class="btn_group_block btn_group_md ui_row">
-							<div class="ui_col_6">
-								<button class="btn btn_primary btn_block"><span>회원가입</span></button>
-							</div>
-							<div class="ui_col_6">
-								<button class="btn btn_dark btn_block"><span>다시 찾기</span></button>
-							</div>
-						</div>
-					</div>
-					<!-- //회원정보로 아이디찾기 실패일경우 -->
-				</div>
-			</div>
-		</div>
-	</div>
-</div>
-
-<script th:inline="javascript">
-/*<![CDATA[*/
-
-/*]]>*/
-</script>
-
-</th:block>
-
-</body>
-</html>

+ 140 - 218
src/main/webapp/WEB-INF/views/web/customer/FindPwdFormWeb.html

@@ -26,183 +26,18 @@
 				<h3>style24</h3>
 			</div>
 			<div class="cont_body">
-				<form class="form_wrap form_col_c" role="form">
+				<div class="form_wrap form_col_c" role="form">
 					<div class="form_head">
 						<h4>아이디&#47;비밀번호 찾기</h4>
 					</div>
 					<div class="registration_nav">
 						<ul>
-							<li class="active"><a href="javascript:void(0)">아이디 찾기</a></li>
-							<li><a href="javascript:void(0)">비밀번호 찾기</a></li>
+							<li><a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_CUSTOMER_ID_FIND);">아이디 찾기</a></li>
+							<li class="active"><a href="javascript:void(0)" onclick="cfnGoToPage(_PAGE_CUSTOMER_PWD_FIND);">비밀번호 찾기</a></li>
 						</ul>
 					</div>
 					<div class="registration_tap">
-						<div class="form_group">
-							<!-- 아이디찾기일경우 -->
-							<div class="foldGroup checkcase">
-								<ul>
-									<li>
-										<form class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit">
-															<span>회원정보로 찾기</span>
-														</div>
-													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt mb30">
-													<p>등록된 내 회원정보로 찾을 수 있습니다.</p>
-												</div>
-												<div class="form_field">
-													<label class="input_label sr-only">이름</label>
-													<div class="ui_col_12">
-														<div class="input_wrap">
-															<input type="text" name="userName" placeholder="이름" id="txtName" class="form_control">
-														</div>
-													</div>
-												</div>
-												<div class="form_field">
-													<label class="input_label sr-only">생년월일 8자리 (예:19880912)</label>
-													<div class="ui_col_12">
-														<div class="input_wrap">
-															<input type="text" name="userBirth" placeholder="생년월일 8자리 (예:19880912)" id="txtBirth" class="form_control">
-														</div>
-													</div>
-												</div>
-												<div class="form_field">
-													<label class="input_label sr-only">이메일</label>
-													<div class="ui_col_12">
-														<div class="input_wrap">
-															<input type="text" name="userEmail" placeholder="이메일" id="txtEmail" class="form_control">
-														</div>
-													</div>
-												</div>
-												<div class="btn_group_block ui_row mt20">
-													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>확인</span></button>
-													</div>
-												</div>
-											</div>
-										</form>
-									</li>
-									<li>
-										<form class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">휴대폰 본인인증으로 찾기</span>
-														</div>
-													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>회원님의 명의로 등록된 휴대폰으로 본인확인을 진행합니다.</p>
-												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>본인명의 휴대폰으로 인증</span></button>
-													</div>
-												</div>
-											</div>
-										</form>
-									</li>
-									<li>
-										<form class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">아이핀 인증으로 찾기</span>
-														</div>
-													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>아이핀 인증을 통해 찾을 수 있습니다.</p>
-												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>아이핀 인증</span></button>
-													</div>
-												</div>
-											</div>
-										</form>
-									</li>
-								</ul>
-							</div>
-							<!-- //아이디찾기일경우 -->
-							<!-- 아이디찾기 성공일경우 -->
-							<div class="find_result clear">
-								<div class="form_info">
-									<span class="ico_content_find"></span>
-									<p>아이디 찾기 결과 안내</p>
-								</div>
-								<div class="form_print_bar mt40">
-									<ul>
-										<li>
-											<span class="t_span">아이디</span>
-											<span class="c_primary bold" data-font="lato">I***D1</span>
-										</li>
-										<li>
-											<span class="t_span">가입일자</span>
-											<span class="bold" data-font="lato">2020.12.22</span>
-										</li>
-										<li>
-											<span class="t_span">가입경로</span>
-											<span class="bold" data-font="lato">YES24 연동</span>
-										</li>
-									</ul>
-								</div>
-								<div class="btn_group_block btn_group_md ui_row">
-									<div class="ui_col_12">
-										<button class="btn btn_dark btn_block"><span>로그인 하기</span></button>
-									</div>
-								</div>
-							</div>
-							<!-- //아이디찾기 성공일경우 -->
-							<!-- 회원정보로 아이디찾기 실패일경우 -->
-							<div class="find_result clear">
-								<div class="form_info">
-									<span class="ico_content_none"></span>
-									<p>입력한 정보와 일치하는 아이디가 존재하지 않습니다.</p>
-									<p class="t_info mt10">
-										정확한 확인을 위해 휴대폰 인증/아이핀 인증을 통한<br>아이디 찾기를 진행해 주세요.
-									</p>
-								</div>
-								<div class="btn_group_block btn_group_md ui_row">
-									<div class="ui_col_6">
-										<button class="btn btn_primary btn_block"><span>회원가입</span></button>
-									</div>
-									<div class="ui_col_6">
-										<button class="btn btn_dark btn_block"><span>다시 찾기</span></button>
-									</div>
-								</div>
-							</div>
-							<!-- //회원정보로 아이디찾기 실패일경우 -->
-							<!-- 휴대폰,아이핀 본인인증으로 아이디찾기 실패일경우 -->
-							<div class="find_result clear">
-								<div class="form_info">
-									<span class="ico_content_none"></span>
-									<p>입력한 정보와 일치하는 아이디가 존재하지 않습니다.</p>
-									<p class="t_info mt10">
-										<span class="c_primary">STYLE24의 새로운 가족이 되어 주세요!</span>
-									</p>
-								</div>
-								<div class="btn_group_block btn_group_md ui_row">
-									<div class="ui_col_12">
-										<button class="btn btn_primary btn_block"><span>회원가입</span></button>
-									</div>
-								</div>
-							</div>
-							<!-- //휴대폰,아이핀 본인인증으로 아이디찾기 실패일경우 -->
-						</div>
-						<div class="form_group" >
+						<div class="form_group" style="display: block;">
 							<!-- 비밀번호찾기일경우 -->
 							<div class="foldGroup checkcase">
 								<ul>
@@ -225,8 +60,10 @@
 													<label class="input_label sr-only">아이디</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="userId" placeholder="아이디" id="txtId" class="form_control">
-															<button type="button" class="btn btn_primary"><span>확인</span></button>
+															<input type="text" name="custId" placeholder="아이디" id="txtId" class="form_control" maxlength="30"/>
+															<button type="button" class="btn btn_primary">
+																<span>확인</span>
+															</button>
 														</div>
 													</div>
 												</div>
@@ -234,7 +71,7 @@
 													<label class="input_label sr-only">이름</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="userName" placeholder="이름" id="txtName" class="form_control">
+															<input type="text" id="custNm" name="custNm" placeholder="이름" class="form_control" maxlength="30"/>
 														</div>
 													</div>
 												</div>
@@ -242,69 +79,67 @@
 													<label class="input_label sr-only">이메일</label>
 													<div class="ui_col_12">
 														<div class="input_wrap">
-															<input type="text" name="userEmail" placeholder="이메일" id="email" class="form_control">
+															<input type="text" id="email" name="email" placeholder="이메일" class="form_control" maxlength="30"/>
 														</div>
 													</div>
 												</div>
 												<div class="btn_group_block ui_row mt20">
 													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>확인</span></button>
+														<button type="button" id="btnInfoConfirm" class="btn btn_dark btn_block">
+															<span>확인</span>
+														</button>
 													</div>
 												</div>
 											</div>
 										</form>
 									</li>
 									<li>
-										<form action="" class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">휴대폰 본인인증으로 찾기</span>
-														</div>
+										<div class="fold_head">
+											<a href="javascript:void(0)">
+												<div>
+													<div class="fold_tit" style="width: inherit;">
+														<span style="width: inherit;">휴대폰 본인인증으로 찾기</span>
 													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>회원님의 명의로 등록된 휴대폰으로 본인확인을 진행합니다.</p>
 												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>본인명의 휴대폰으로 인증</span></button>
-													</div>
+											</a>
+										</div>
+										<div class="fold_cont">
+											<div class="txt">
+												<p>회원님의 명의로 등록된 휴대폰으로 본인확인을 진행합니다.</p>
+											</div>
+											<div class="ui_row mt20">
+												<div class="ui_col_12">
+													<button class="btn btn_dark btn_block"><span>본인명의 휴대폰으로 인증</span></button>
 												</div>
 											</div>
-										</form>
+										</div>
 									</li>
 									<li>
-										<form action="" class="form_wrap" role="form">
-											<div class="fold_head">
-												<a href="javascript:void(0)">
-													<div>
-														<div class="fold_tit" style="width: inherit;">
-															<span style="width: inherit;">아이핀 인증으로 찾기</span>
-														</div>
+										<div class="fold_head">
+											<a href="javascript:void(0)">
+												<div>
+													<div class="fold_tit" style="width: inherit;">
+														<span style="width: inherit;">아이핀 인증으로 찾기</span>
 													</div>
-												</a>
-											</div>
-											<div class="fold_cont">
-												<div class="txt">
-													<p>아이핀 인증을 통해 찾을 수 있습니다.</p>
 												</div>
-												<div class="ui_row mt20">
-													<div class="ui_col_12">
-														<button class="btn btn_dark btn_block"><span>아이핀 인증</span></button>
-													</div>
+											</a>
+										</div>
+										<div class="fold_cont">
+											<div class="txt">
+												<p>아이핀 인증을 통해 찾을 수 있습니다.</p>
+											</div>
+											<div class="ui_row mt20">
+												<div class="ui_col_12">
+													<button class="btn btn_dark btn_block"><span>아이핀 인증</span></button>
 												</div>
 											</div>
-										</form>
+										</div>
 									</li>
 								</ul>
 							</div>
 							<!-- //비밀번호찾기일경우 -->
 							<!-- 비밀번호 재설정 -->
-							<div class="find_result clear">
+							<div id="divNewPassword" class="find_result clear">
 								<div class="form_info">
 									<span class="ico_content_security"></span>
 									<p>안전을 위해 비밀번호를 변경하신 후 이용이 가능합니다.</p>
@@ -312,7 +147,7 @@
 								<div class="form_field mt40">
 									<label class="input_label sr-only">신규 비밀번호</label>
 									<div class="ui_col_12">
-										<input type="password" name="userPassword" placeholder="신규 비밀번호" id="txtPassword">
+										<input type="password" id="password" name="password" placeholder="신규 비밀번호" >
 										<!-- case (사용불가 비밀번호일경우,사용가능한 비밀번호일경우) -->
 										<div class="help_block">
 											<!-- 사용불가 비밀번호일경우 -->
@@ -334,7 +169,7 @@
 								<div class="form_field">
 									<label class="input_label sr-only">비밀번호 확인</label>
 									<div class="ui_col_12">
-										<input type="password" name="userConfirm" placeholder="비밀번호 확인" id="txtConfirm">
+										<input type="password" id="confirmPassword" name="confirmPassword" placeholder="비밀번호 확인">
 										<!-- case (비밀번호확인 틀렸을경우,비밀번호 일치할경우) -->
 										<div class="help_block">
 											<!-- 비밀번호확인 틀렸을경우 -->
@@ -344,9 +179,9 @@
 											<!-- //비밀번호확인 틀렸을경우 -->
 											<!-- 비밀번호 일치할경우 -->
 											<p class="mt10">
-                                                    <span class="c_black2">
-                                                        <i class="ico ico_check black mr5"></i>새 비밀번호가 일치합니다.
-                                                    </span>
+												<span class="c_black2">
+													<i class="ico ico_check black mr5"></i>새 비밀번호가 일치합니다.
+												</span>
 											</p>
 											<!-- //비밀번호 일치할경우 -->
 										</div>
@@ -355,13 +190,15 @@
 								</div>
 								<div class="btn_group_block btn_group_md ui_row">
 									<div class="ui_col_12">
-										<button class="btn btn_dark btn_block"><span>변경 후 다시 로그인</span></button>
+										<button type="button" id="btnSavePassword" class="btn btn_dark btn_block">
+											<span>변경 후 다시 로그인</span>
+										</button>
 									</div>
 								</div>
 							</div>
 							<!-- //비밀번호 재설정 -->
 							<!-- 임시비밀번호 발급 -->
-							<div class="find_result clear">
+							<div id="divSendEmail" class="find_result clear">
 								<div class="form_info">
 									<span class="ico_content_mail"></span>
 									<p>아래의 이메일로 임시비밀번호가 발급되었습니다.</p>
@@ -374,14 +211,16 @@
 								</div>
 								<div class="btn_group_block btn_group_md ui_row">
 									<div class="ui_col_12">
-										<button class="btn btn_dark btn_block"><span>로그인 하기</span></button>
+										<button type="button" class="btn btn_dark btn_block" onclick="cfnGoToPage(_PAGE_LOGIN);">
+											<span>로그인 하기</span>
+										</button>
 									</div>
 								</div>
 							</div>
 							<!-- //임시비밀번호 발급 -->
 						</div>
 					</div>
-				</form>
+				</div>
 			</div>
 		</div>
 	</div>
@@ -390,6 +229,89 @@
 <script th:inline="javascript">
 /*<![CDATA[*/
 
+var fnCheckPassword = function () {
+	let custId = $('#custId').val();
+	let password = $('#password').val();
+	let confirmPassword = $('#confirmPassword').val();
+
+
+
+	// 길이
+	if(!/^[a-zA-Z0-9!@#$%^&*()?_~]{6,15}$/.test(password)) {
+		console.log("비밀번호는 숫자, 영문, 특수문자 조합으로 6~15자리를 사용해야 합니다.");
+		return false;
+	}
+
+	// 영문, 숫자, 특수문자 2종 이상 혼용
+	var count = 0;
+	if(password.search(/[0-9]/g) != -1 ) count ++;
+	if(password.search(/[a-z]/ig)  != -1 ) count ++;
+	if(password.search(/[!@#$%^&*()?_~]/g)  != -1  ) count ++;
+	if(count < 2) {
+		console.log("비밀번호는 숫자, 영문, 특수문자를 두가지이상 혼용하여야 합니다.");
+		return false;
+	}
+
+	// 동일한 문자/숫자 4이상, 연속된 문자
+	if(/(\w)\1\1\1/.test(password) || isContinuedValue(password)) {
+		console.log("비밀번호에 4자 이상의 연속 또는 반복 문자 및 숫자를 사용하실 수 없습니다.");
+		return false;
+	}
+
+	// 아이디 포함 여부
+	if(password.search(custId)>-1) {
+		console.log("ID가 포함된 비밀번호는 사용하실 수 없습니다.");
+		return false;
+	}
+
+	// 재입력 일치 여부
+	if (password != confirmPassword) {
+		console.log("입력한 두 개의 비밀번호가 서로  일치하지 않습니다.");
+		return false;
+	}
+
+}
+
+function isContinuedValue(password) {
+	console.log("password = " + password);
+	var intCnt1 = 0;
+	var intCnt2 = 0;
+	var temp0 = "";
+	var temp1 = "";
+	var temp2 = "";
+	var temp3 = "";
+
+	for (var i = 0; i < password.length-3; i++) {
+		console.log("=========================");
+		temp0 = password.charAt(i);
+		temp1 = password.charAt(i + 1);
+		temp2 = password.charAt(i + 2);
+		temp3 = password.charAt(i + 3);
+
+		console.log(temp0)
+		console.log(temp1)
+		console.log(temp2)
+		console.log(temp3)
+
+		if (temp0.charCodeAt(0) - temp1.charCodeAt(0) == 1
+			&& temp1.charCodeAt(0) - temp2.charCodeAt(0) == 1
+			&& temp2.charCodeAt(0) - temp3.charCodeAt(0) == 1) {
+			intCnt1 = intCnt1 + 1;
+		}
+
+		if (temp0.charCodeAt(0) - temp1.charCodeAt(0) == -1
+			&& temp1.charCodeAt(0) - temp2.charCodeAt(0) == -1
+			&& temp2.charCodeAt(0) - temp3.charCodeAt(0) == -1) {
+			intCnt2 = intCnt2 + 1;
+		}
+		console.log("=========================");
+	}
+
+	console.log(intCnt1 > 0 || intCnt2 > 0);
+	return (intCnt1 > 0 || intCnt2 > 0);
+}
+
+
 /*]]>*/
 </script>
 

+ 30 - 0
src/main/webapp/WEB-INF/views/web/customer/NiceCallbackFormWeb.html

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : NiceCallbackFormWeb.html
+ * @desc    : NICE 인증콜백 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.02.09   jsshin     최초 작성
+ *******************************************************************************
+ -->
+<body>
+
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	window.onload = function () {
+		top.opener.fnNiceCallBack([[${sEncData}]], [[${authMethod}]]);
+		self.close();
+	}
+
+	/*]]>*/
+</script>
+
+</body>
+</html>

+ 37 - 0
src/main/webapp/WEB-INF/views/web/customer/NiceCellPhoneFormWeb.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : NiceCellPhoneFormWeb.html
+ * @desc    : NICE 휴대폰 인증 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.02.09   jsshin     최초 작성
+ *******************************************************************************
+ -->
+<body>
+
+<form name="niceAuthForm" id="niceAuthForm" method="post" >
+	<input type="hidden" name="m" value="checkplusSerivce" />
+	<input type="hidden" name="EncodeData" th:value="${sEncData}" />
+</form>
+
+<script th:inline="javascript">
+	/*<![CDATA[*/
+
+	window.onload = function () {
+		document.niceAuthForm.action="https://nice.checkplus.co.kr/CheckPlusSafeModel/checkplus.cb";
+		document.niceAuthForm.target="popupCellphone";
+		document.niceAuthForm.submit();
+	};
+	/*]]>*/
+</script>
+
+
+</body>
+</html>

+ 39 - 0
src/main/webapp/WEB-INF/views/web/customer/NiceIpinFormWeb.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : NiceIpinFormWeb.html
+ * @desc    : NICE 아이핀 인증 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.02.09   jsshin     최초 작성
+ *******************************************************************************
+ -->
+<!--<head th:replace="~{web/common/fragments/HeaderWeb :: header}"></head>-->
+<!--<th:block th:replace="~{web/common/fragments/VariablesWeb :: variables}"></th:block>-->
+<body>
+
+<form name="niceAuthForm" id="niceAuthForm" method="post" >
+	<input type="hidden" name="m" value="pubmain" />
+	<input type="hidden" name="enc_data" th:value="${sEncData}" />
+</form>
+
+<script th:inline="javascript">
+	/*<![CDATA[*/
+
+	window.onload = function () {
+		document.niceAuthForm.action="https://cert.vno.co.kr/ipin.cb";
+		document.niceAuthForm.target="popupIpin";
+		document.niceAuthForm.submit();
+	};
+	/*]]>*/
+</script>
+
+
+</body>
+</html>

+ 67 - 1
src/main/webapp/ux/style24_link.js

@@ -8,7 +8,11 @@ const _PAGE_LOGOUT = "/logout";	// GNB > 로그아웃
 const _PAGE_MAIN = _frontUrl + "/display/mall/main/form";	// 몰메인
 
 //== 고객 ==/
-
+const _PAGE_CUSTOMER_ID_FIND = _frontUrl + "/customer/id/find/form";					// 고객 > 아이디 찾기
+const _PAGE_CUSTOMER_PWD_FIND = _frontUrl + "/customer/pwd/find/form";					// 고객 > 비밀번호 찾기
+const _PAGE_CUSTOMER_JOIN = _frontUrl + "/customer/join/form";							// 고객 > 고객가입
+const _PAGE_CUSTOMER_JOIN_COMPLETE = _frontUrl + "/customer/join/complete/form";		// 고객 > 고객가입 > 완료페이지
+const _PAGE_CUSTOMER_DORMANT = _frontUrl + "/customer/dormant/certify/form";			// 고객 > 휴면회원
 //== 상품상세 ==/
 
 //== 장바구니 ==/
@@ -58,3 +62,65 @@ var cfnGoToPage = function(page, ithrCd) {
 	if (ithrCd) params += "&ithrCd=" + ithrCd;
 	document.location.href = params;
 }
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 나이스 휴대폰 인증
+ * <pre>
+ *     cfnOpenCellphoneCertify();
+ *     호출된 페이지에서
+ *     PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
+ *     MO : redirectUrl 호출하는 페이지에서 넣어줘야됨
+ * </pre>
+ * @param  redirectUrl - 모바일에서 사용 페이지이동으로 하기 때문에
+ * @param  custparams - 회원정보수정 화면에서 사용함
+ * @since  : 2021/02/09
+ * @author : jsshin
+ */
+var cfnOpenCellphoneCertify = function (redirectUrl, custparams) {
+	var actionUrl = _frontUrl + "/customer/nice/cellphone/form";
+	var popupWidth = 450;
+	var popupHeight = 700;
+	var popupX = (window.screen.width / 2) - (popupWidth / 2);
+	var popupY = (window.screen.height / 3) - (popupHeight / 3);
+	if ('P' === _frontGb) {
+		window.open(actionUrl, "popupCellphone", "top=" + popupY + ", left=" + popupX + ", width=" + popupWidth + ", height=" + popupHeight + ", fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbar=no");
+	} else {
+		if (!gagajf.isNull(redirectUrl)) {
+			actionUrl = actionUrl + "?redirectUrl=" + redirectUrl;
+			if (!gagajf.isNull(custparams)) {
+				actionUrl = actionUrl + "&custparams=" + custparams;
+			}
+			document.location.href = actionUrl;
+		}
+	}
+};
+
+/**
+ * @type   : function
+ * @access : public
+ * @desc   : 나이스 휴대폰 인증
+ * <pre>
+ *     cfnOpenIpinCertify();
+ *     호출된 페이지에서
+ *     PC : fnNiceCallBack(encData) 콜백 함수 생성 후 encData 가지고 호출 처리
+ *     MO :
+ * </pre>
+ * @since  : 2021/02/09
+ * @author : jsshin
+ */
+var cfnOpenIpinCertify = function (redirectUrl) {
+	var actionUrl = _frontUrl + "/customer/nice/ipin/form";
+	var popupWidth = 450;
+	var popupHeight = 700;
+	var popupX = (window.screen.width / 2) - (popupWidth / 2);
+	var popupY = (window.screen.height / 3) - (popupHeight / 3);
+	if ('P' === _frontGb) {
+		window.open(actionUrl, "popupIpin", "top=" + popupY + ", left=" + popupX + ", width=" + popupWidth + ", height=" + popupHeight + ", fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbar=no");
+	} else {
+		if (!gagajf.isNull(redirectUrl)) {
+			document.location.href = actionUrl + "?redirectUrl=" + redirectUrl;
+		}
+	}
+};