Example #1
0
        public IHttpActionResult VerifyMobile(VerifyMobileRequest request)
        {
            _commands.VerifyMobileNumber(PlayerId, request.VerificationCode);

            var uri = UriRootToProfileInfo + PlayerId;

            return(Created(uri, new VerifyMobileResponse()
            {
                UriToPlayerWhoseMobileWasVerified = uri
            }));
        }
        public ActionResult <BoolResult> VerifyMobile([FromBody] VerifyMobileRequest request)
        {
            var codeCacheKey = GetSmsCodeCacheKey(request.Mobile);
            var code         = _cacheManager.Get <int>(codeCacheKey);

            if (code == 0 || TranslateUtils.ToInt(request.Code) != code)
            {
                return(this.Error("输入的验证码有误或验证码已超时"));
            }

            return(new BoolResult
            {
                Value = true
            });
        }
 public async Task <VerifyMobileResponse> VerifyMobile(VerifyMobileRequest request)
 {
     return(await _memberApiProxy.VerifyMobileAsync(request));
 }
Example #4
0
        public async Task <VerifyMobileResponse> VerifyMobileAsync(VerifyMobileRequest request)
        {
            var result = await HttpClient.SecurePostAsJsonAsync(Token, "api/Player/VerifyMobile", request);

            return(await EnsureApiResult <VerifyMobileResponse>(result));
        }