public InnerAttribute(IRecaptchaTokenProvider tokenProvider, IRecaptchaConfigurationProvider configurationProvider,
                       IRecaptchaHttpClient recaptchaHttpClient, IRecaptchaConfigurationStore configurationStore)
 {
     this.tokenProvider         = tokenProvider ?? throw new ArgumentNullException(nameof(tokenProvider));
     this.configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider));
     this.recaptchaHttpClient   = recaptchaHttpClient ?? throw new ArgumentNullException(nameof(recaptchaHttpClient));
     this.configurationStore    = configurationStore ?? throw new ArgumentNullException(nameof(configurationStore));
 }
 public static Task <TResponse> VerifyRecaptchaAsync <TResponse>(this IRecaptchaHttpClient httpClient,
                                                                 RecaptchaConfiguration configuration, HttpRequest request, IRecaptchaTokenProvider tokenProvider)
     where TResponse : IRecaptchaResponse
 {
     return(httpClient.VerifyRecaptchaAsync <TResponse>(configuration.Secret, tokenProvider.GetToken(request),
                                                        request.HttpContext.Connection.RemoteIpAddress));
 }