コード例 #1
0
        /// <summary>
        /// The default captcha protection provider
        /// </summary>
        public CaptchaProtectionProvider(
            IDataProtectionProvider dataProtectionProvider,
            ILogger <CaptchaProtectionProvider> logger)
        {
            dataProtectionProvider.CheckArgumentNull(nameof(dataProtectionProvider));
            logger.CheckArgumentNull(nameof(logger));

            _logger        = logger;
            _dataProtector = dataProtectionProvider.CreateProtector(typeof(CaptchaProtectionProvider).FullName);
        }
コード例 #2
0
        public AuthenticatorUserManager(IUserStore <TUser> store,
                                        IOptions <IdentityOptions> optionsAccessor,
                                        IPasswordHasher <TUser> passwordHasher,
                                        IEnumerable <IUserValidator <TUser> > userValidators,
                                        IEnumerable <IPasswordValidator <TUser> > passwordValidators,
                                        ILookupNormalizer keyNormalizer,
                                        IdentityErrorDescriber errors,
                                        IServiceProvider services,
                                        ILogger <UserManager <TUser> > logger,
                                        IDataProtectionProvider dataProtectionProvider,
                                        IAuthenticatorService authenticatorService)
            : base(store, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger)
        {
            dataProtectionProvider.CheckArgumentNull(nameof(dataProtectionProvider));
            authenticatorService.CheckArgumentNull(nameof(authenticatorService));

            _authenticatorService = authenticatorService;
            _dataProtector        = dataProtectionProvider.CreateProtector("AuthenticatorUserManager");
        }