示例#1
0
 /// <summary>
 /// Serialization Provider
 /// </summary>
 public DistributedSerializationProvider(
     IDistributedCache distributedCache,
     ICaptchaProtectionProvider captchaProtectionProvider,
     ILogger <DistributedSerializationProvider> logger)
 {
     distributedCache.CheckArgumentNull(nameof(distributedCache));
     _distributedCache          = distributedCache;
     _logger                    = logger;
     _captchaProtectionProvider = captchaProtectionProvider;
     _logger.LogDebug("Using the DistributedSerializationProvider.");
 }
示例#2
0
 /// <summary>
 /// Serialization Provider
 /// </summary>
 public DistributedSerializationProvider(
     IDistributedCache distributedCache,
     ICaptchaCryptoProvider captchaProtectionProvider,
     ILogger <DistributedSerializationProvider> logger,
     IOptions <DNTCaptchaOptions> options)
 {
     distributedCache.CheckArgumentNull(nameof(distributedCache));
     _distributedCache          = distributedCache;
     _logger                    = logger;
     _captchaProtectionProvider = captchaProtectionProvider;
     _options                   = options.Value;
     _logger.LogDebug("Using the DistributedSerializationProvider.");
 }
示例#3
0
        /// <summary>
        /// Represents the storage to save the captcha tokens.
        /// </summary>
        public DistributedCacheCaptchaStorageProvider(
            ICaptchaProtectionProvider captchaProtectionProvider,
            IDistributedCache distributedCache,
            ILogger <DistributedCacheCaptchaStorageProvider> logger)
        {
            captchaProtectionProvider.CheckArgumentNull(nameof(captchaProtectionProvider));
            logger.CheckArgumentNull(nameof(logger));
            distributedCache.CheckArgumentNull(nameof(distributedCache));

            _captchaProtectionProvider = captchaProtectionProvider;
            _logger           = logger;
            _distributedCache = distributedCache;

            _logger.LogInformation("Using the DistributedCacheCaptchaStorageProvider.");
        }
示例#4
0
        /// <summary>
        /// Represents the storage to save the captcha tokens.
        /// </summary>
        public DistributedCacheCaptchaStorageProvider(
            ICaptchaProtectionProvider captchaProtectionProvider,
            IDistributedCache distributedCache,
            ILogger <DistributedCacheCaptchaStorageProvider> logger,
            IOptions <DNTCaptchaOptions> options)
        {
            captchaProtectionProvider.CheckArgumentNull(nameof(captchaProtectionProvider));
            logger.CheckArgumentNull(nameof(logger));
            distributedCache.CheckArgumentNull(nameof(distributedCache));

            _captchaProtectionProvider = captchaProtectionProvider;
            _logger           = logger;
            _distributedCache = distributedCache;
            _options          = options.Value;

            _logger.LogDebug("Using the DistributedCacheCaptchaStorageProvider.");
        }