public async Task LoggingInAsync(string userName, Action <string, string> reportError) { if (_reCaptchaService.IsThisARobot()) { await _reCaptchaService.ValidateCaptchaAsync(reportError); } }
public override async Task <ActivityExecutionResult> ExecuteAsync(WorkflowExecutionContext workflowContext, ActivityContext activityContext) { var outcome = "Valid"; await _reCaptchaService.ValidateCaptchaAsync((key, error) => { var updater = _updateModelAccessor.ModelUpdater; outcome = "Invalid"; if (updater != null) { updater.ModelState.TryAddModelError(Constants.ReCaptchaServerResponseHeaderName, T["Captcha validation failed. Try again."]); } }); return(Outcomes("Done", outcome)); }
public Task RecoveringPasswordAsync(Action <string, string> reportError) { return(_recaptchaService.ValidateCaptchaAsync(reportError)); }
public Task RegistrationValidationAsync(Action <string, string> reportError) { return(_reCaptchaService.ValidateCaptchaAsync(reportError)); }