public RecaptchaScriptTagHelper(IRecaptchaConfigurationService service, IHttpContextAccessor contextAccessor)
        {
            service.CheckArgumentNull(nameof(service));
            contextAccessor.CheckArgumentNull(nameof(contextAccessor));

            _service         = service;
            _contextAccessor = contextAccessor;
        }
Exemple #2
0
        public ValidateRecaptchaFilter(IRecaptchaValidationService service, IRecaptchaConfigurationService configurationService, ILoggerFactory loggerFactory)
        {
            service.CheckArgumentNull(nameof(service));
            service.CheckArgumentNull(nameof(configurationService));
            loggerFactory.CheckArgumentNull(nameof(loggerFactory));

            _service = service;
            _configurationService = configurationService;
            _logger = loggerFactory.CreateLogger <ValidateRecaptchaFilter>();
        }
Exemple #3
0
        public RecaptchaScriptTagHelper(IRecaptchaConfigurationService service, IHttpContextAccessor contextAccessor)
        {
            service.CheckArgumentNull(nameof(service));
            contextAccessor.CheckArgumentNull(nameof(contextAccessor));

            _service         = service;
            _contextAccessor = contextAccessor;
            var services = contextAccessor.HttpContext.RequestServices;

            if (!(services is null))
            {
                var nonceService = services.GetService(typeof(ICspNonceService));
                if (!(nonceService is null))
                {
                    _nonceService = nonceService as CspNonceService;
                }
            }
        }
Exemple #4
0
        public RecaptchaTagHelper(IRecaptchaConfigurationService service)
        {
            service.CheckArgumentNull(nameof(service));

            _service = service;
        }
Exemple #5
0
        public RecaptchaInvisibleScriptTagHelper(RecaptchaService service)
        {
            service.CheckArgumentNull(nameof(service));

            _service = service;
        }
Exemple #6
0
 public RecaptchaTagHelper(IRecaptchaConfigurationService service) => Service = service;
 public RecaptchaScriptTagHelper(IRecaptchaConfigurationService service, IHttpContextAccessor contextAccessor)
 {
     Service         = service;
     ContextAccessor = contextAccessor;
 }
 public ValidateRecaptchaFilter(IRecaptchaValidationService service, IRecaptchaConfigurationService configurationService, ILoggerFactory loggerFactory)
 {
     Service = service;
     ConfigurationService = configurationService;
     Logger = loggerFactory.CreateLogger <ValidateRecaptchaFilter>();
 }