public TwoFactorAuthenticationPartHandler(IRepository <TwoFactorAuthenticationPartRecord> repository, ITwoFactorAuthenticator twoFactorAuthenticator) { _twoFactorAuthenticator = twoFactorAuthenticator; Filters.Add(StorageFilter.For(repository)); OnInitializing <TwoFactorAuthenticationPart>((context, part) => { if (part.SecretKey == null) { part.SecretKey = _twoFactorAuthenticator.GenerateKey(); } }); }
public TwoFactorAuthenticationPartHandler(IRepository<TwoFactorAuthenticationPartRecord> repository, ITwoFactorAuthenticator twoFactorAuthenticator) { _twoFactorAuthenticator = twoFactorAuthenticator; Filters.Add(StorageFilter.For(repository)); OnInitializing<TwoFactorAuthenticationPart>((context, part) => { if (part.SecretKey == null) { part.SecretKey = _twoFactorAuthenticator.GenerateKey(); } }); }
public LoginController( ApplicationContextActivityDecorator traceActivityDecorator, ConfigPreloader configPreloader, ApplicationCache cache, RecaptchaManager recaptchaManager, ITwoFactorAuthenticator twoFactorAuthenticator, ILogger <LoginController> logger, IMessageBus messageBus, IHttpContextAccessor httpContextAccessor) { this.traceActivityDecorator = traceActivityDecorator; this.configPreloader = configPreloader; this.cache = cache; this.recaptchaManager = recaptchaManager; this.twoFactorAuthenticator = twoFactorAuthenticator; this.logger = logger; this.messageBus = messageBus; this.httpContextAccessor = httpContextAccessor; }
public TwoFactorAuthenticationController( IAuthenticationService authenticationService, IMembershipService membershipService, IUserService userService, IOrchardServices orchardServices, IUserEventHandler userEventHandler, ITwoFactorAuthenticator twoFactorAuthenticator, INotifier notifier, IMessageService messageService, IFeatureManager featureManager) { _authenticationService = authenticationService; _membershipService = membershipService; _userService = userService; _orchardServices = orchardServices; _userEventHandler = userEventHandler; _twoFactorAuthenticator = twoFactorAuthenticator; _notifier = notifier; _messageService = messageService; _featureManager = featureManager; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public static ITwoFactorAuthenticator GetTwoFactorAuthenticator() { ITwoFactorAuthenticator authenticator = (EmailCodeAuthenticator) new EmailCodeAuthenticator(); return(authenticator); }
public TwoFactorAuthenticationPartDriver(ITwoFactorAuthenticator twoFactorAuthenticator, IOrchardServices services) { _twoFactorAuthenticator = twoFactorAuthenticator; _services = services; T = NullLocalizer.Instance; }