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

            _service         = service;
            _contextAccessor = contextAccessor;
        }
Ejemplo n.º 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>();
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 4
0
        public RecaptchaTagHelper(IRecaptchaConfigurationService service)
        {
            service.CheckArgumentNull(nameof(service));

            _service = service;
        }
Ejemplo n.º 5
0
        public RecaptchaInvisibleScriptTagHelper(RecaptchaService service)
        {
            service.CheckArgumentNull(nameof(service));

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