Example #1
0
        public VerifyCode PopVerifyCodeViaMobile(string mobile)
        {
            var key  = String.Format(KEY_VCODE_FMT, mobile);
            var code = _redisHelper.StringGet(key);

            if (string.IsNullOrWhiteSpace(code))
            {
                return(null);
            }

            //使验证码失效
            _redisHelper.KeyDelete(key);

            return(new VerifyCode {
                Mobile = mobile, Code = code
            });
        }
Example #2
0
 public void Logout(string sign)
 {
     _redisHelper.KeyDelete(string.Format(ONLINE_USER_SIGN_KEY_FMT, sign));
 }