/* * SSO 서비스 상태 확인 요청 */ function fIsSSOService(){ try{ var url = ssoUrl+"/jsp/user/pm/ssl/pmGetSSOService.jsp"; url = url.strip(); var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = url; head.appendChild(script); return false; }catch(e){ alert("[debug].[fIsSSOService()][error]["+e+"]"); return fIsSSOServiceCallBack('false'); } } /* * SSO 서비스 상태 확인 콜백 */ function fIsSSOServiceCallBack( ssoService ){ try{ // true ssoService = ssoService.strip(); if( ssoService ){ // SSO 서비스 상태 "정상" fGetChallenge(); return false; }else{// SSO 서비스상태 "오류" return true; } }catch(e){ alert(e); alert("[debug].[fIsSSOServiceCallBack()][error]["+e+"]"); } } /* * 랜덤1 생성 */ function fGetChallenge() { try{ var url = agentUrl+"/passni/jsp/challenge/pmGetChallenge.jsp"; // Legacy Challenge URL url = url.strip(); new Ajax.Request( url , { method :'post', asynchronous:false, onSuccess : fSubmit, onFailure : function(){} }); }catch(e){ alert("[debug].[fGetChallenge()][error]["+e+"]"); } } /* * 로그인 전송 이벤트 */ function fSubmit( transport ){ try{ var r1 = transport.responseText; r1 = r1.strip(); var actionUrl = ssoUrl+"/jsp/user/pm/ssl/pmAuthAction.do"; // SSO 인증 처리 URL var userid = $("j_username").value; var userpw = $("j_password").value; userid = userid.strip(); userpw = userpw.strip(); if( userid == "" || userid == null ){ alert("통합로그인 아이디를 입력하십시오."); $("j_username").focus(); return false; } if( userpw == "" || userpw == null){ alert("통합로그인 비밀번호를 입력하십시오."); $("j_password").focus(); return false; } if( appid=="" || failUrl =="" ){ alert("요청 파라미터가 올바르지 않습니다."); return false; } document.formSend.userid.value = userid; document.formSend.userpw.value = userpw; document.formSend.r1.value = r1; document.formSend.method.value = "pmSignGate"; document.formSend.loginType.value = "invokeSSL"; document.formSend.appid.value = appid; document.formSend.retUrl.value = retUrl; document.formSend.failUrl.value = failUrl; document.formSend.action = actionUrl; document.formSend.submit(); return false; }catch(e){ location.href='/net/login.do'; //alert("[debug].[fSubmit()][error]["+e+"]"); } } /* * ID/PW 로그인 버튼 */ function fLogin(){ var result = fIsSSOService(); // SSO 서비스 상태 확인 return result; }