/// <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."); }
/// <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."); }
/// <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."); }
/// <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."); }