public CaptchaService(ICaptchaStore captchaStore, IGraphicsProvider graphicsStrategy, IRandomProvider randomProvider) { _captchaStore = captchaStore; _graphicsStrategy = graphicsStrategy; _randomProvider = randomProvider; }
/// <summary> /// /// </summary> /// <param name="next"></param> /// <param name="store"></param> /// <param name="generator"></param> /// <param name="options"></param> public DefaultCaptchaMiddleware( RequestDelegate next, ICaptchaStore store, ICaptchaImageGenerator generator, IOptions <CaptchaOptions> options) { this.next = next; this.store = store; this.generator = generator; this.options = options.Value; }
/// <summary> /// /// </summary> /// <param name="options"></param> /// <param name="store"></param> /// <param name="loggerFactory"></param> public DefaultCaptcha( IOptions <CaptchaOptions> options, ICaptchaStore store, ILoggerFactory loggerFactory) { this.store = store; this.options = options.Value; logger = loggerFactory.CreateLogger(typeof(DefaultCaptcha)); textGenerator = new CaptchaTextGenerator(this.options.AllowedChars, this.options.CaptchaLength); }
public DefaultCaptchaManager(IClock clock, ICaptchaGenerator captchaGenerator, ICurrentTenant currentTenant, ISettingProvider settingProvider, ISmsCaptchaSender smsCaptchaSender, IEmailCaptchaSender emailCaptchaSender, ICaptchaStore captchaStore) { Clock = clock; CaptchaGenerator = captchaGenerator; CurrentTenant = currentTenant; SettingProvider = settingProvider; SmsCaptchaSender = smsCaptchaSender; EmailCaptchaSender = emailCaptchaSender; CaptchaStore = captchaStore; Logger = NullLogger <DefaultCaptchaManager> .Instance; }