private void ArrangeAuthenticateUserTests() { _repositoryMock = new Mock <IRepository <User> >(); _validatorMock = new Mock <IValidator <LoginInputModel> >(); var secretBytes = new byte[40]; var rand = new Random(); rand.NextBytes(secretBytes); _authenticationHelper = new AuthenticationHelper(secretBytes); _authenticationHelper.CreatePasswordHash("Passw0rd", out var passwordHash, out var passwordSalt); _user = new User { Username = "******", PasswordHash = passwordHash, PasswordSalt = passwordSalt, IsAdmin = true }; _repositoryMock.Setup(repo => repo.ReadByName(_user.Username)).Returns(_user); _userService = new UserService(_repositoryMock.Object, _authenticationHelper, _validatorMock.Object); }
public CardDecksController( ITableStorageContextFactory tableStorageContextFactory, IAuthenticationHelper authenticationHelper) { this.lazyTableStorageContext = new Lazy<ITableStorageContext>(() => tableStorageContextFactory.CreateTableStorageContext(AzureTableNames.CARD, authenticationHelper.NameIdentifier)); }
public QuizResultHandler(ITableStorageContextFactory tableStorageContextFactory, IAuthenticationHelper authenticationHelper) { this.authenticationHelper = authenticationHelper; this.lazyQuizCalendar = new Lazy<IQuizCalendar>(() => tableStorageContextFactory .CreateTableStorageContext(AzureTableNames.CARD, this.authenticationHelper.NameIdentifier) .UserConfigurations.GetByNameIdentifier().QuizCalendar); }
public QuizResultsControllerFake( ITableStorageContextFactory tableStorageContextFactory, IQuizResultHandler quizResultHandler, IAuthenticationHelper authenticationHelper) : base(tableStorageContextFactory, quizResultHandler, authenticationHelper) { }
public TokenController(IUserRepository <User> repos, IAuthenticationHelper authService) { repository = repos; authenticationHelper = authService; }
public MainPageViewModel(ICharacterRepository repository, IAuthenticationHelper helper, INavigationService service) { _repository = repository; _helper = helper; _service = service; Characters = new ObservableCollection <CharacterViewModel>(); DetailsPageCommand = new RelayCommand(o => { _service.Navigate(typeof(CharacterPage), o); }); SignInOutCommand = new RelayCommand(async o => { if (_account != null) { await _helper.SignOutAsync(_account); _account = null; Characters.Clear(); } else { _account = await _helper.SignInAsync(); if (_account != null) { await Initialize(); } } }); }
public StationController(IAuthenticationHelper authenticationHelper, IStationRepository stationRepository, IMapper mapper, LinkGenerator linkGenerator) { AuthenticationHelper = authenticationHelper; StationRepository = stationRepository; Mapper = mapper; LinkGenerator = linkGenerator; }
public CheckoutController(ICommandSender commandSender, IQuerySender querySender, IPasswordHasher <string> passwordHasher, IAuthenticationHelper authenticationHelper, ISessionProvider sessionProvider, IConfirmationEmailSender confirmationEmailSender, IClientIpProvider clientIpProvider, ISiteIdProvider siteIdProvider, ISiteUrlsProvider siteUrlsProvider, IGeoCurrency geoCurrency, FIL.Logging.ILogger logger, IMailChimpProvider mailChimpProvider) { _commandSender = commandSender; _querySender = querySender; _passwordHasher = passwordHasher; _authenticationHelper = authenticationHelper; _sessionProvider = sessionProvider; _confirmationEmailSender = confirmationEmailSender; _clientIpProvider = clientIpProvider; _siteIdProvider = siteIdProvider; _siteUrlsProvider = siteUrlsProvider; _logger = logger; _geoCurrency = geoCurrency; _mailChimpProvider = mailChimpProvider; }
public ServerListViewModel(IEventAggregator eventAggregator, IAuthenticationHelper authenticationHelper, IWebTasks webTasks) { _eventAggregator = eventAggregator ?? throw new ArgumentNullException(nameof(eventAggregator)); _authenticationHelper = authenticationHelper ?? throw new ArgumentNullException(nameof(authenticationHelper)); _webTasks = webTasks ?? throw new ArgumentNullException(nameof(webTasks)); _serverList = new ObservableCollection <ServerModel>(); }
public BusinessController(IBusinessRepository businessRepository, IMapper mapper, LinkGenerator linkGenerator, IAuthenticationHelper authenticationHelper) { BusinessRepository = businessRepository; Mapper = mapper; LinkGenerator = linkGenerator; AuthenticationHelper = authenticationHelper; }
public DataInit(IPetRepository petRepository, IOwnerRepository ownerRepository, IPetTypeRepository petTypeRepository, IAuthenticationHelper authHelper) { _petRepository = petRepository; _ownerRepository = ownerRepository; _petTypeRepository = petTypeRepository; authenticationHelper = authHelper; }
public WorldManagementService(IWorldRepository WorldRepository, IUserRepository userRepository, IAuthenticationHelper authenticationHelper, IWorldPublisher worldPublisher) { this._worldRepository = WorldRepository; this._userRepository = userRepository; this._authenticationHelper = authenticationHelper; this._worldPublisher = worldPublisher; }
public TermEditor(ISqlTermRepository termRepository, IMapper <TermEditModel, Term> termEditMapper, IDbTransaction dbTransaction, ILogRepository logRepository, IAuthenticationHelper authenticationHelper) { this.termRepository = termRepository; this.termEditMapper = termEditMapper; this.dbTransaction = dbTransaction; this.logRepository = logRepository; this.authenticationHelper = authenticationHelper; }
public IndividualController(IIndividualRepository individualRepository, IMapper mapper, LinkGenerator linkGenerator, IAuthenticationHelper authenticationHelper, IStationRepository stationRepository) { IndividualRepository = individualRepository; Mapper = mapper; LinkGenerator = linkGenerator; AuthenticationHelper = authenticationHelper; StationRepository = stationRepository; }
public DbInitializer( UnitedMarketsDbContext ctx, IRepository <Market> marketRepository, IAuthenticationHelper authenticationHelper) { _ctx = ctx; _marketRepository = marketRepository; _authenticationHelper = authenticationHelper; }
public ConversationsController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager, IAuthenticationTokenHelper <Guid> authenticationTokenHelper, IQueryFactory queryFactory, IConversationSummaryRepository conversationSummaryRepository, IMessageRepository messageRepository, IAuthenticationHelper authenticationHelper, ICommandPublisher <Guid> commandPublisher) : base(logger, correlationIdHelper, configurationManager, authenticationTokenHelper) { QueryFactory = queryFactory; ConversationSummaryRepository = conversationSummaryRepository; MessageRepository = messageRepository; AuthenticationHelper = authenticationHelper; CommandPublisher = commandPublisher; }
public SessionController(IAuthenticationHelper authenticationHelper, ISessionProvider sessionProvider, IPasswordHasher <string> passwordHasher, IQuerySender querySender) { _authenticationHelper = authenticationHelper; _passwordHasher = passwordHasher; _querySender = querySender; _sessionProvider = sessionProvider; }
public CardEntityKeyGenerator( IAuthenticationHelper authenticationHelper, IIdentityQueueManager identityQueueManager, string rowType) { this.authenticationHelper = authenticationHelper; this.IdentityQueueManager = identityQueueManager; this.RowType = rowType; }
public AuthController( IUserDataAccess userDataAccess, IAuthenticationHelper authenticationHelper, IWebCmiConfigProvider webCmiConfigProvider, IApplicationRoleUserDataAccess applicationRoleUserDataAccess) { authControllerHelper = new AuthControllerHelper(applicationRoleUserDataAccess, userDataAccess, ControllerHelper, authenticationHelper, webCmiConfigProvider); }
public UserHelper( IAuthenticationHelper authenticationHelper, IIdentityQueueManager identityQueueManager, IQuizCalendar defaultQuizCalendar) { this.authenticationHelper = authenticationHelper; this.identityQueueManager = identityQueueManager; this.defaultQuizCalendar = defaultQuizCalendar; }
public DataInitializer(IPetRepository petRepository, IOwnerRepository ownerRepository, ITypePetRepository typePetRepository, IUserRepository userRepository, IAuthenticationHelper authenticationHelper) { _userRepository = userRepository; _petRepository = petRepository; _ownerRepository = ownerRepository; _typePetRepository = typePetRepository; _authHelper = authenticationHelper; }
public LoginController(IUserService userService, IConfiguration configuration, IAuthenticationHelper authenticationHelper) { this._userService = userService; this._authenticationHelper = authenticationHelper; this._tokenManager = new TokenManager( configuration["JwtKey"], double.Parse(configuration["JwtExpireDays"]), configuration["JwtIssuer"] ); }
public DataInitializer(IPetRepository petRepository, IPetTypeRepository petTypeRepository, IOwnerRepository ownerRepository, IColorRepository colorRepository, IPetColorRepository petColorRepository, IUserRepository userRepository, IAuthenticationHelper authHelper) { _petRepository = petRepository; _petTypeRepository = petTypeRepository; _ownerRepository = ownerRepository; _colorRepository = colorRepository; _petColorRepository = petColorRepository; _userRepository = userRepository; authenticationHelper = authHelper; }
public LoginPage() { aboutToolbarItem = new ToolbarItem("About", "helpIcon.png", this.About_Click, 0, 0); InitializeComponent(); this.Appearing += LoginPage_Appearing; this.BindingContext = new LoginPageViewModel(); authHelper = DependencyService.Get <IAuthenticationHelper>(); }
public QuizResultsController( ITableStorageContextFactory tableStorageContextFactory, IQuizResultHandler quizResultHandler, IAuthenticationHelper authenticationHelper) { this.quizResultHandler = quizResultHandler; this.authenticationHelper = authenticationHelper; this.lazyTableStorageContext = new Lazy<ITableStorageContext>(() => tableStorageContextFactory.CreateTableStorageContext(AzureTableNames.CARD, this.authenticationHelper.NameIdentifier)); }
public TermCreator( ISqlTermRepository termRepository, IDbTransaction dbTransaction, IAuthenticationHelper authenticationHelper, ILogRepository logRepository) { this.termRepository = termRepository; this.dbTransaction = dbTransaction; this.authenticationHelper = authenticationHelper; this.logRepository = logRepository; }
/// <inheritdoc /> public void BeforeTest(ITest test) { this.log = this.CreateLogger(); var pageType = GetFixturePage(test); var configBuilder = test.Fixture as IProvideWebDriverConfigBuilder; var configHolder = test.Fixture as IRequireCurrentWebDriverConfig; var authentication = test.Fixture as IRequireAuthentication; var screenshots = test.Fixture as IRequireScreenshots; var downloads = test.Fixture as IRequireDownloadDirectory; var config = configBuilder?.Builder.Build() ?? WebDriver .Configure( builder => { builder.WithDefaultOptions(); if (downloads != null) { builder.DownloadDirectory(downloads.DownloadDirectory); } return(builder); }, log) .Build(); if (configHolder != null) { configHolder.Config = config; } /* lazy initialized */ authHelper = new AuthenticationHelper(config, log); var init = authentication != null ? (Action <IWebDriverConfig, IWebDriver, IAuthenticationHelper>)AuthenticatedInitialize : Initialize; ExceptionDispatchInfo initializationException = null; (webDriver, initializationException) = WebDriverFactory.CreateAndInitialize(config, (cfg, drv) => init(cfg, drv, authHelper)); initializationException?.Throw(); var requiresWebForPageType = RequiresWebType.MakeGenericType(pageType); var page = GetPage(pageType, config); requiresWebForPageType.GetProperty("StartPage")?.SetValue(test.Fixture, page); if (screenshots != null) { page.WaitForPageToLoad(); SaveScreenshotForEachTab(TestContext.CurrentContext, "_pre"); } }
public LoginGoogleController(ICommandSender commandSender, IQuerySender querySender, IAuthenticationHelper authenticationHelper, ISessionProvider sessionProvider, ILogger logger, IClientIpProvider clientIpProvider, MailChimp.IMailChimpProvider mailChimpProvider) { _commandSender = commandSender; _querySender = querySender; _authenticationHelper = authenticationHelper; _sessionProvider = sessionProvider; _logger = logger; _clientIpProvider = clientIpProvider; _mailChimpProvider = mailChimpProvider; }
public AuthControllerHelper(IApplicationRoleUserDataAccess applicationRoleUserDataAccess, IUserDataAccess userDataAccess, IControllerHelper controllerHelper, IAuthenticationHelper authenticationHelper, IWebCmiConfigProvider webCmiConfigProvider) { this.applicationRoleUserDataAccess = applicationRoleUserDataAccess; this.userDataAccess = userDataAccess; this.controllerHelper = controllerHelper; this.webCmiConfigProvider = webCmiConfigProvider; this.authenticationHelper = authenticationHelper; }
public OTPLoginController(ICommandSender commandSender, IQuerySender querySender, IPasswordHasher <string> passwordHasher, IAuthenticationHelper authenticationHelper, ISessionProvider sessionProvider, IOTPProvider otpProvider, ILogger logger, ISettings settings, IClientIpProvider clientIpProvider) { _commandSender = commandSender; _querySender = querySender; _passwordHasher = passwordHasher; _authenticationHelper = authenticationHelper; _sessionProvider = sessionProvider; _otpProvider = otpProvider; _logger = logger; _settings = settings; _clientIpProvider = clientIpProvider; }
public AuthenticationMiddleware( RequestDelegate next, IConfiguration configuration, ILogger <AuthenticationMiddleware> logger, IAuthenticationHelper authHelper, Func <string, ContentfulConfig> createConfig) { _next = next; _configuration = configuration; _logger = logger; _authHelper = authHelper; _createConfig = createConfig; }
public TextReader( ISqlTextRepository textRepository, IMapper <Text, TextReadModel> textReadMapper, IDbTransaction dbTransaction, ILogRepository logRepository, IAuthenticationHelper authenticationHelper) { this.textRepository = textRepository; this.textReadMapper = textReadMapper; this.dbTransaction = dbTransaction; this.logRepository = logRepository; this.authenticationHelper = authenticationHelper; }
public UserService( IRepository <User> userRepository, IAuthenticationHelper authenticationHelper, IValidator <LoginInputModel> loginInputModelValidator) { _userRepository = userRepository ?? throw new ArgumentNullException(nameof(userRepository), "Repository cannot be null."); _authenticationHelper = authenticationHelper ?? throw new ArgumentNullException(nameof(authenticationHelper), "AuthenticationHelper cannot be null."); _loginInputModelValidator = loginInputModelValidator ?? throw new ArgumentNullException(nameof(loginInputModelValidator), "LoginInputModelValidator cannot be null."); }
public UserService(IUserRepository userRepository, IFoodEntryRepository foodEntryRepository, IMapper mapper, ILogger <IUserService> logger, IAuthenticationHelper authenticationHelper, IJwtHelper jwtHelper, IUserProfileCalculator userProfileCalculator) { _userRepository = userRepository; _foodEntryRepository = foodEntryRepository; _mapper = mapper; _logger = logger; _authenticationHelper = authenticationHelper; _jwtHelper = jwtHelper; _userProfileCalculator = userProfileCalculator; }
public ExportWorkerJob(Int32 agentId, IAgentHelper agentHelper, ISqlQueryHelper sqlQueryHelper, DateTime processedOnDateTime, IEnumerable <Int32> resourceGroupIds, IAPILog logger, IArtifactQueries artifactQueries, APIOptions rsapiApiOptions, IRsapiRepositoryGroup rsapiRepositoryGroup, IAuthenticationHelper authenticationHelper, ISerializationHelper serializationHelper) { TableRowId = 0; WorkspaceArtifactId = -1; AgentId = agentId; AgentHelper = agentHelper; SqlQueryHelper = sqlQueryHelper; QueueTable = Constant.Tables.ExportWorkerQueue; ProcessedOnDateTime = processedOnDateTime; AgentResourceGroupIds = resourceGroupIds; Logger = logger; ArtifactQueries = artifactQueries; RsapiApiOptions = rsapiApiOptions; RsapiRepositoryGroup = rsapiRepositoryGroup; AuthenticationHelper = authenticationHelper; SerializationHelper = serializationHelper; }
public AddProjectPageViewModel(IProjectAPI _projectAPI, IAuthenticationHelper _helper, INavigationService _service, ILocationAPI _locationAPI, ISkillAPI _skillAPI, IAttachmentAPI _attachmentAPI) { projectAPI = _projectAPI; helper = _helper; service = _service; skillAPI = _skillAPI; attachmentAPI = _attachmentAPI; locationAPI = _locationAPI; account = CommonAttributes.account; UserName = account.UserName; SignInOutButtonText = account == null ? "Sign In" : "Sign Out"; //init countries list Countries = new ObservableCollection <string>(GetCountryList()); SignInOutCommand = new RelayCommand(async o => { //sign out if (account != null) { await helper.SignOutAsync(account); account = null; CommonAttributes.account = account; SignInOutButtonText = "Sign In"; service.Navigate(typeof(LogInPage), null); } else //sign in { account = await helper.SignInAsync(); if (account != null) { CommonAttributes.account = account; UserName = account.UserName; SignInOutButtonText = "Sign Out"; } } }); MenuOptions = new HamburgerMenuOptionsFactory(CommonAttributes.account).MenuOptions; }
public UserService(IAuthenticationHelper authenticationHelperService) { _authenticationHelperService = authenticationHelperService; }
private void RESTfulClient_Load(object sender, EventArgs e) { helper = new FormsAuthenticationHelper(); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex == (int)AuthenticationModes.Forms) helper = new FormsAuthenticationHelper(); else helper = new ClaimsAuthenticationHelper(); }
public UIUtils(ICachePersist cachePersist, IAuthenticationHelper authenticationHelper) { _cachePersist = cachePersist; _authenticationHelper = authenticationHelper; }
public CardsControllerFake( ITableStorageContextFactory tableStorageContextFactory, IAuthenticationHelper authenticationHelper) : base(tableStorageContextFactory, authenticationHelper) { }
public FederationCallbackController(IAuthenticationHelper authenticationHelper, ITokenStore tokenStore) { this.authenticationHelper = authenticationHelper; this.tokenStore = tokenStore; }
public AccountController() { _userProfileDbWrapper = new UserProfileDbWrapper(); _authenticationHelper = new AuthenticationHelper(); }
public AccountController(IUserProfileDbWrapper userProfileDbWrapper, IAuthenticationHelper authenticationHelper) { _userProfileDbWrapper = userProfileDbWrapper; _authenticationHelper = authenticationHelper; }
public RESTfulClient() { InitializeComponent(); helper = new ClaimsAuthenticationHelper(); }
public AccountController(IAuthenticationHelper authenticationHelper) { this.authenticationHelper = authenticationHelper; }