hbehr.recaptcha.ReCaptchaObject.ValidateResponseAsync C# (CSharp) Method

ValidateResponseAsync() private method

private ValidateResponseAsync ( IReChaptaWebInterfaceAsync webInterface, string response ) : Task
webInterface IReChaptaWebInterfaceAsync
response string
return Task
        internal async Task<bool> ValidateResponseAsync(IReChaptaWebInterfaceAsync webInterface, string response)
        {
            CheckIfIamConfigured();
            var answer = await webInterface.PostUserAnswerAsync(response, _secretKey);
            TreatReCaptchaError(answer);
            return answer.Success;
        }

Same methods

ReCaptchaObject::ValidateResponseAsync ( IReChaptaWebInterfaceAsync webInterface, string response, WebProxy proxy ) : Task

Usage Example

Example #1
0
 public static async Task <bool> ValidateCaptchaAsync(string response, WebProxy proxy = null)
 {
     return(await _reCaptcha.ValidateResponseAsync(new GoogleWebPostAsync(), response, proxy));
 }