Exemple #1
0
        public static bool Check(M_Comp_Verify model)
        {
            switch (model.vtype)
            {
            case 1:
                return(tcVerify.Check(model));

            case 0:
            default:
                return(cmsVerify.Check(model));
            }
        }
Exemple #2
0
        public bool Check(M_Comp_Verify model)
        {
            string key  = model.sid;
            string s    = model.token;
            bool   flag = true;

            if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(s) || !CodeDic.ContainsKey(key) || string.IsNullOrEmpty(CodeDic[key]))
            {
                flag = false;
            }
            else if (!s.ToLower().Equals(CodeDic[key].ToLower()))
            {
                flag = false;
            }
            if (!string.IsNullOrEmpty(key) && CodeDic.ContainsKey(key))
            {
                CodeDic.Remove(key);
            }
            return(flag);
        }
Exemple #3
0
        public bool Check(M_Comp_Verify model)
        {
            //string token = RequestEx["token"];
            ////一次验证传递的参数,同一次验证一样
            //string sid = RequestEx["sid"];
            //-----------
            //sid = "5d5c6ac5-a5cc-4cba-a760-12320b48ee4e";
            string checkAddress = "sverify-5-2-0";

            //TouClickSDk.TouClick t = new TouClickSDk.TouClick();
            //TouClickSDk.Status status = t.check(model.sid, checkAddress, model.token, PUBKEY, PRIKEY);
            //Console.Write("checkAddress :" + checkAddress + ",token:" + token + ",sid:" + sid);
            //Console.Write("code :" + status.Code + ",message:" + status.Message);

            //if (status != null && status.Code == 0)
            //{
            //    //执行自己的程序逻辑
            //    t.callback(checkAddress, model.sid, model.token, PUBKEY, PRIKEY);
            //    //return CommonReturn.Success(status.Message);
            //    return true;
            //}
            return(false);
        }