public override void Init() { base.Init(); _recaptchaService = App.GetService<IRecaptchaService>(); _loginLog = App.GetService<ILoginLogService>(); _sessionService = App.GetService<IUserSessionService>(); _incidentLog = App.GetService<IIncidentLogService>(); _notificationService = App.GetService<INotificationService>(); // automatically create notification service if it is not found - to ease upgrading after refactoring that introduced this service (Feb 2016) if (_notificationService == null) _notificationService = NotificationService.Create(App); // Password checker if(_settings.PasswordChecker == null) _settings.PasswordChecker = new PasswordStrengthChecker(App); IEncryptionService encrService = App.GetService<IEncryptionService>(); Util.Check(encrService != null, "Failed to get encryption service."); //never happens, module requires EncryptedDataModule if (!string.IsNullOrWhiteSpace(_settings.EncryptionChannelName)) Util.Check(encrService.IsRegistered(_settings.EncryptionChannelName), "Encryption channel '{0}' for LoginModule is not registered in EncryptedDataModule."); //Login failed trigger if(_incidentLog != null && _settings.LoginFailedTriggerSettings != null) { var trigger = new LoginFailedTrigger(App, _settings.LoginFailedTriggerSettings); _incidentLog.AddTrigger(trigger); } }
public ValidationController(StarkitContext db, UserManager <User> userManager, SignInManager <User> signInManager, IRecaptchaService recaptcha) { _db = db; _userManager = userManager; _signInManager = signInManager; _recaptcha = recaptcha; }
public HomeController(IRecaptchaService recaptcha) { _recaptcha = recaptcha; }
public AccountController(LdapSignInManager signInManager, IRecaptchaService recaptchaService) { this.signInManager = signInManager; this._recaptchaService = recaptchaService; }
public JobListingController(IEnumerable <IGenerateEmail> emailGenerators, ISendEmail sendEmail, IValidateResume resumeValidator, IRecaptchaService recaptchaService) { _emailGenerators = emailGenerators; _sendEmail = sendEmail; _resumeValidator = resumeValidator; _recaptchaService = recaptchaService; }
public EmailUsController(ILogger <EmailUsController> logger, IEmailService emailService, WebsiteDataContext db, IRecaptchaService reCAPTCHA) { _Logger = logger; _EmailService = emailService; _Db = db; _Recaptcha = reCAPTCHA; }
public LoginModel(SignInManager <GadgetCMSUser> signInManager, ILogger <LoginModel> logger, IRecaptchaService recaptcha) { _signInManager = signInManager; _logger = logger; _recaptcha = recaptcha; }
public SupportController(ILogger logger, IDataSetsHelper dataSetsHelper, IRoles roles, IMailer mailer, IOptions <WebsiteConfiguration> config, IAuthentication authentication, IFileSourceHelper fileSourceHelper, IOptions <StripeConfiguration> stripeConfig, IDonationService donationService, IMembershipService membershipService, IContactService contactService, IOptions <RecaptchaConfiguration> recaptchaConfig, IRecaptchaService recaptchaService) : base(logger, dataSetsHelper, roles, authentication, fileSourceHelper, membershipService) { _logger = logger; _mailer = mailer; _donationService = donationService; _contactService = contactService; _recaptchaService = recaptchaService; _recaptchaConfig = recaptchaConfig.Value; _config = config.Value; _urlHelper = new UrlHelper(System.Web.HttpContext.Current.Request.RequestContext); }
public AdController(IRecaptchaService rcService, IAdRepository adRepository, IUserRepository userRepository) { _rcService = rcService; _adRepository = adRepository; _userRepository = userRepository; }
public LoginController(ILoggerFactory loggerFactory, IRecaptchaService recaptchaService) { _logger = loggerFactory.CreateLogger <LoginController>(); _recaptchaService = recaptchaService; }
public AnnouncementController(ApplicationContext context, IMapper mapper, IWebHostEnvironment appEnwironment, IRecaptchaService recaptcha) { db = context; _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _appEnwironment = appEnwironment; _recaptcha = recaptcha; if (!db.Announcements.Any()) { db.Announcements.Add( new Announcement { OrderNumber = 1, user = new User { Name = "Tom" }, Text = "пойду добровольно в армию!", CreationDate = DateTime.Now, Rating = 3 }); db.SaveChanges(); } }
public PersonController(IRecaptchaService recaptcha, IOptions <RecaptchaOptions> recaptchaOptions) { this.recaptcha = recaptcha as RecaptchaService; this.recaptchaOptions = recaptchaOptions.Value; }
public ValidateRecaptchaImpl(IRecaptchaService recaptchaService) { this.recaptchaService = recaptchaService; }
public IdentityController(UserManager <User> userManager, SignInManager <User> signInManager, RoleManager <IdentityRole <int> > roleManager, IRecaptchaService recaptcha, ILogger <IdentityController> logger) { _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _recaptcha = recaptcha; _logger = logger; }
public AccountController(IRepository <User> userRepository, ILogger logger, IMailer mailer, IOptions <WebsiteConfiguration> websiteConfig, IDataSetsHelper dataSetsHelper, IRoles roles, IAccountService accountService, IAuthentication authentication, IFileSourceHelper fileSourceHelper, IFacebookService facebookService, IMembershipService membershipService, IContactService contactService, IUserService userService, IRepository <PromoCode> promoCodesRepository, IOptions <RecaptchaConfiguration> recaptchaConfig, IRecaptchaService recaptchaService) : base(logger, dataSetsHelper, roles, authentication, fileSourceHelper, membershipService) { _userRepository = userRepository; _logger = logger; _accountService = accountService; _authentication = authentication; _facebookService = facebookService; _membershipService = membershipService; _contactService = contactService; _userService = userService; _promoCodesRepository = promoCodesRepository; _recaptchaService = recaptchaService; _recaptchaConfig = recaptchaConfig.Value; websiteConfig.Value.RegistrationEmailTemplateText = Globalisation.Dictionary.WelcomeEmail; websiteConfig.Value.PasswordResetEmailTemplateText = Globalisation.Dictionary.PasswordResetEmail; }
public HomeController(IRecaptchaService recaptcha) { _recaptcha = recaptcha; _minimumScore = 0.5; _errorMessage = "There was an error validating the google recaptcha response. Please try again, or contact the site owner."; }
public ForgotPasswordModel(UserManager <ApplicationUser> userManager, IEmailService emailService, IRecaptchaService recaptchaService) { _userManager = userManager; _emailService = emailService; _recaptchaService = recaptchaService; }
public HomeController(ILogger <HomeController> logger, UserManager <THUMember> userManager, SignInManager <THUMember> signInManager, IKeyStorageService keyStorageService, IWebHostEnvironment hostingEnvironment, IRecaptchaService recaptchaService) { _logger = logger; this.userManager = userManager; this.signInManager = signInManager; this.keyStorageService = keyStorageService; iHostingEnvironment = hostingEnvironment; this._recaptchaService = recaptchaService; }
public ValidateRecaptchaFilter(IRecaptchaService recaptcha, double minimumScore, string errorMessage) { _recaptcha = recaptcha; _minimumScore = minimumScore; _errorMessage = errorMessage; }
public CreateDoublesRegistrationCommandHandler(ILoggerFactory loggerFactory, IUnitOfWork unitOfWork, IRegistrationUnitOfWork registrationUnitOfWork, CreateDoublesRegistrationCommandValidator validator, ICompetitionRepository competitionRepository, ICompetitionRegistrationRepository competitionRegistrationRepository, IRecaptchaService recaptchaService, IRegistrationEmailManager registrationEmailManager, ICompetitionRegistrationAttemptRepository competitionRegistrationAttemptRepository, ICompetitionDateRepository competitionDateRepository) { this._logger = loggerFactory.CreateLogger <CreateDoublesRegistrationCommandHandler>(); this._validator = validator; this._unitOfWork = unitOfWork; this._registrationUnitOfWork = registrationUnitOfWork; this._competitionRepository = competitionRepository; this._competitionRegistrationRepository = competitionRegistrationRepository; this._recaptchaService = recaptchaService; this._registrationEmailManager = registrationEmailManager; this._competitionRegistrationAttemptRepository = competitionRegistrationAttemptRepository; this._competitionDateRepository = competitionDateRepository; }
public RecaptchaMiddleware(RequestDelegate next, IRecaptchaService recaptchaService, IOptionsMonitor <RecaptchaSettings> options) { _next = next; _recaptchaService = recaptchaService; _options = options; }
public AdminController(UserManager <AppUser> userManager, SignInManager <AppUser> signInManager, IUserValidator <AppUser> userValidator, IPasswordHasher <AppUser> passwordHasher, IPasswordValidator <AppUser> passwordValidator, IRecaptchaService recaptcha) { _passwordHasher = passwordHasher; _passwordValidator = passwordValidator; _userValidator = userValidator; _userManager = userManager; SignInManager = signInManager; _recaptcha = recaptcha; }
public HomeController(IRecaptchaService recaptcha) { return; }
public AccountController(UserManager <User> userManager, RoleManager <IdentityRole> roleManager, SignInManager <User> signInManager, StarkitContext db, IHostEnvironment environment, IRecaptchaService recaptcha) { _userManager = userManager; _roleManager = roleManager; _signInManager = signInManager; _db = db; _environment = environment; _recaptcha = recaptcha; }
public AccountsController(IUserService userService, UnitOfWork unitOfWork, IRecaptchaService recaptcha) => (_userService, this.unitOfWork, this.recaptcha) =
public ContactsController(IRecaptchaService recaptcha) { _recaptcha = recaptcha; }
public AccountController(SignInManager <User> signInManager, UserManager <User> userManager, RoleManager <IdentityRole> roleManager, IRecaptchaService recaptcha, ApplicationContext context, IProfileRepository profileRepository) { this.signInManager = signInManager; this.userManager = userManager; this.roleManager = roleManager; _recaptcha = recaptcha; this.context = context; _profileRepository = profileRepository; }
public AccountController(IRecaptchaService recaptcha) { _recaptcha = recaptcha; }
public AccountController(UserManager <User> userManager, SignInManager <User> signInManager, IRecaptchaService recaptcha) { _userManager = userManager; _signInManager = signInManager; _recaptcha = recaptcha; }
public BlogPostController(IBlogManager blogManager, IHttpContextAccessor httpContextAccessor, IDasBlogSettings dasBlogSettings, IMapper mapper, ICategoryManager categoryManager, IFileSystemBinaryManager binaryManager, ILogger <BlogPostController> logger, IBlogPostViewModelCreator modelViewCreator, IMemoryCache memoryCache, IRecaptchaService recaptcha) : base(dasBlogSettings) { this.blogManager = blogManager; this.categoryManager = categoryManager; this.httpContextAccessor = httpContextAccessor; this.dasBlogSettings = dasBlogSettings; this.mapper = mapper; this.binaryManager = binaryManager; this.logger = logger; this.modelViewCreator = modelViewCreator; this.memoryCache = memoryCache; this.recaptcha = recaptcha; }
public UsersController(IUserService userService, IRecaptchaService recaptchaService) { _userService = userService; _recaptchaService = recaptchaService; }