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 }); }
public void Logout(string sign) { _redisHelper.KeyDelete(string.Format(ONLINE_USER_SIGN_KEY_FMT, sign)); }