예제 #1
0
        public void Authenticate(string userid, string password, string co_id, string mac, string stripaddr)
        {
            //정제
            TransportLoginBiz Target = new TransportLoginBiz();

            //동작
            DataSet Result = Target.Authenticate(userid, password, co_id, mac, stripaddr);

            //검증
            DumpDataSet(Result);
        }
예제 #2
0
        /// <summary>
        /// 사용자 인증 프로세스 시작
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="password"></param>
        /// <param name="adminyn"></param>
        /// <param name="chkidsave"></param>
        /// <returns></returns>
        /// <remarks>
        /// 수정정보:
        ///   2008-01-29 노재현 GSM 비밀번호 정책 적용 
        /// </remarks>
        public bool Authenticate(string userid, string password, string co_id, string mac, string ip)
        {
            InitializePage();
            bool brtn = false;
            brtn = CheckLoginIdPwd(userid, password);
            if (brtn == false)
            {
                return brtn;
            }

            userid = RemoveAletter(userid);
            TransportLoginBiz user = new TransportLoginBiz();
            string stripaddr = ip; // this.Request.ServerVariables["REMOTE_ADDR"];
            //string strHttpReferer = this.Request.ServerVariables["HTTP_REFERER"];

            _ip = stripaddr;
            _mac = mac;

            DataSet ds = user.Authenticate(userid, password, co_id, mac, ip);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                brtn = true;

                DataRow row = ds.Tables[0].Rows[0];

                SetDefaultCookies(row, userid);

                SetCookiesLoginInfo(row, userid, password);

                AddUserCertificationNo(row);

                //FormsAuthentication.SetAuthCookie(row["CUST_NO"].ToString(), false);
            }
            else
            {
                brtn = false;
            }
            return brtn;
        }
예제 #3
0
        /// <summary>
        /// 사용자의 고객번호에 따른 인증번호를 반환한다.
        /// 인증번호 쿠키저장
        /// </summary>
        /// <param name="userDR"></param>
        private void AddUserCertificationNo(DataRow userDR)
        {
            TransportLoginBiz bizUsers = new TransportLoginBiz();
            DataTable authDT = bizUsers.AddUserCertificationNo(userDR["CUST_NO"].ToString().Trim());

            if (authDT != null && authDT.Rows.Count > 0)
            {
                //DelCookie("auth_no");
                //SetCookie("auth_no", authDT.Rows[0]["auth_no"].ToString().Trim(), _CookieExpires);
                _CookieAuthentication += authDT.Rows[0]["auth_no"].ToString().Trim();
                _CookieAuthentication += "-" + DateTime.Now.ToString("yyyyMMddHHmmss");  //초단위까지 저장

                DelCookie("GPif");
                SetCookie("GPif", _CookieAuthentication, _CookieExpires);
                DelCookie("GSif");
                SetCookie("GSif", _CookieAuthentication, _CookieExpires);
            }
        }