public FineApi( IRepository<User, UserDataModel, Guid> userRepository, IRepository<Payment, PaymentDataModel, Guid> paymentRepository, IFineMapper fineMapper, IUserMapper userMapper, IPaymentMapper paymentMapper, IExcelExportService<FineExportModel> excelExportService, IChannelApi channelApi, IUserApi userApi, IGroupsApi groupApi, IChatApi chatApi, IReactionApi reactionApi) { this.userRepository = userRepository; this.paymentRepository = paymentRepository; this.fineMapper = fineMapper; this.userMapper = userMapper; this.paymentMapper = paymentMapper; this.excelExportService = excelExportService; this.channelApi = channelApi; this.userApi = userApi; this.groupApi = groupApi; this.chatApi = chatApi; this.reactionApi = reactionApi; }
public BugzillaActionFactory(IBugzillaInfoStorageRepository bugzillaStorage, IStorageRepository repository, IUserMapper userMapper) { _bugzillaStorage = bugzillaStorage; _repository = repository; _userMapper = userMapper; }
public LdapApi( IRepository<User, UserDataModel, Guid> userRepository, IUserMapper userMapper ) { this.userRepository = userRepository; this.userMapper = userMapper; }
public UnitOfWork(IUserMapper repository) { newObjects = new List<User>(); cleanObjects = new List<User>(); dirtyObjects = new List<User>(); removedObjects = new List<int>(); this.repository = repository; }
public void SetUp() { var tables = new List<string> { CreateTableUsers }; var inserts = new List<string> { InsertUser }; _mapper = new UserMapper(); _connection = DbUtils.CreateConnection("TestDbUserRepository.sdf", tables, inserts); _sut = new UserRepository(_connection,_mapper); }
// GET: Task public TaskController(IProjectService projectService, IUserService userService, ITaskService taskService, ITaskMapper taskMapper,IUserMapper userMapper) { this.taskMapper = taskMapper; this.taskService = taskService; this.userService = userService; this.projectService = projectService; this.userMapper = userMapper; }
//private ITaskMapper taskMapper; public TaskMapper (ITaskService taskService, IUserService userService, IUserMapper userMapper, IProjectService projectService) { //this.taskMapper = taskMapper; this.taskService = taskService; this.projectService = projectService; this.userService = userService; this.userMapper = userMapper; }
public TeamViewService(ITeamMapper teamMapper, IUserRepository userRepository, IUserValidator userValidator, ITeamValidator teamValidator, IUserMapper userMapper, ITeamRepository teamRepository) { _teamMapper = teamMapper; _teamRepository = teamRepository; _userMapper = userMapper; _teamValidator = teamValidator; _userValidator = userValidator; _userRepository = userRepository; }
//Method to handle populating session data: public void setSessionData(IUserMapper user) { //Populate Session data with user data from the database: Session["Authenticated"] = true; Session["Id"] = user.Id; Session["Name"] = user.Name; Session["RoleName"] = user.RoleName; Session["RoleId"] = user.RoleId; Session["UserMapper"] = user; }
public UserManager(IMembershipInfoProvider membershipAdapter, IUserRepository userRepository, IUserMapper userMapper, ISession session, IProfileManager profileManager, IHttpUserFetcher userfetcher) { _membershipAdapter = membershipAdapter; _userRepository = userRepository; _userMapper = userMapper; _session = session; _profileManager = profileManager; _UserFetcher = userfetcher; }
public AddressInformationService(ILogger <UserService> logger, IUserMapper userMapper, IAdressInformationRepository adressInformationRepository, ITokenProvider tokenProvider, IConfiguration configuration) { _logger = logger; _userMapper = userMapper; _adressInformationRepository = adressInformationRepository; _tokenProvider = tokenProvider; _configuration = configuration; }
//Constructor public UserController(ISession session, IUserMapper userMapper, IHttpUserFetcher userFetcher , IUserSession userSession, IUserManager userManager, IUserNameCheck usernamecheck) { _session = session; _userSession = userSession; _userFetcher = userFetcher; _userMapper = userMapper; _userManager = userManager; _usernamecheck = usernamecheck; }
public TeamChangedHandler(IStorageRepository storage, IBugzillaInfoStorageRepository bugzillaInfoStorageRepository, IBugzillaService service, IBugzillaActionFactory actionFactory, IUserMapper userMapper, IActivityLogger logger) { _storage = storage; _bugzillaInfoStorageRepository = bugzillaInfoStorageRepository; _service = service; _actionFactory = actionFactory; _userMapper = userMapper; _logger = logger; }
public UploadCsvFileService( IUsersBulkInsertRepository usersBulkInsertRepository, IFileParserService fileParserService, IUserMapper userMapper ) { _usersBulkInsertRepository = usersBulkInsertRepository; _fileParserService = fileParserService; _userMapper = userMapper; }
public TaskMapper( IUserMapper userMapper, IPriorityMapper priorityMapper, IStatusMapper statusMapper, ICategoryMapper categoryMapper) { _userMapper = userMapper; _priorityMapper = priorityMapper; _statusMapper = statusMapper; _categoryMapper = categoryMapper; }
public virtual Response Authenticate( INancyModule nancyModule, IUserMapper userMapper, IConfiguration configuration, IUserRepository userRepository, UserCredentials userCredentials, IViewRenderer viewRenderer, IModuleStaticWrappers moduleStaticWrappers) { throw new NotImplementedException(); }
public UsersController( IUserManager userManager, IUserMapper userMapper, IHttpUserFetcher userFetcher, ISession session) { _userManager = userManager; _userMapper = userMapper; _userFetcher = userFetcher; _session = session; }
public UserApi( IRepository<User, UserDataModel, Guid> userRepository, IUserMapper userMapper, IMemberInfoApi memberInfoApi, IRepository<Payment, PaymentDataModel, Guid> paymentRepository) { this.userRepository = userRepository; this.userMapper = userMapper; this.memberInfoApi = memberInfoApi; this.paymentRepository = paymentRepository; }
public TaskUsersController( IHttpTaskFetcher taskFetcher, IHttpUserFetcher userFetcher, ISession session, IUserMapper userMapper) { _taskFetcher = taskFetcher; _userFetcher = userFetcher; _session = session; _userMapper = userMapper; }
public UsersController( UserManager <ApplicationUser> userManager, IUserMapper userMapper, ISingerMapper singerMapper, IChoirmasterMapper choirmasterMapper) { _userManager = userManager; _userMapper = userMapper; _singerMapper = singerMapper; _choirmasterMapper = choirmasterMapper; }
public void InitFormsAuth() { userMapper = new UserDatabase(); config = new FormsAuthenticationConfiguration() { RedirectUrl = "~/login", UserMapper = userMapper, }; }
public UserViewService(IUserRepository userRepository, IWorkshopRepository workshopRepository, ITeamRepository teamRepository, IUserValidator userValidator, IUserMapper userMapper, ICryptographerService cryptoService, IUserService userService) { _userRepository = userRepository; _userService = userService; _cryptoService = cryptoService; _userMapper = userMapper; _userValidator = userValidator; _workshopRepository = workshopRepository; _teamRepository = teamRepository; }
public UserService( IExportableTransaction exportableTransaction, IExportableCategory exportableCategory, IRepositoryFactory repositoryFactory, IUserMapper userMapper) { this.exportableTransaction = exportableTransaction; this.exportableCategory = exportableCategory; this.repositoryFactory = repositoryFactory; this.userMapper = userMapper; }
public UserController( IServiceUser serviceUser, IServiceUserGroup serviceUserGroup, IUserMapper userMapper, IUrlHelper urlHelper) { this.serviceUser = serviceUser; this.serviceUserGroup = serviceUserGroup; this.userMapper = userMapper; this.urlHelper = urlHelper; }
public CodeNoteMapper(IGeneralSubjectMapper generalSubjectMapper, INoteTypeMapper noteTypeMapper, IUserMapper userMapper, IProjectMapper projectMapper, ISpecificSubjectMapper specificSubjectMapper) { _generalSubjectMapper = generalSubjectMapper; _noteTypeMapper = noteTypeMapper; _userMapper = userMapper; _projectMapper = projectMapper; //_codeNoteDetailMapper = codeNoteDetailMapper; _specificSubjectMapper = specificSubjectMapper; }
public SetCurrentUserProcessor( IVisitorContext visitorContext, IUserMapper userMapper, ILogService <CommonLog> logService) : base(logService) { Assert.ArgumentNotNull(visitorContext, nameof(visitorContext)); Assert.ArgumentNotNull(userMapper, nameof(userMapper)); this.visitorContext = visitorContext; this.userMapper = userMapper; }
public AuthService( IUserMapper userMapper, IUserRepository userRepository, IOptions <TokenOptions> tokenOptions, IRefreshTokenRepository refreshTokenRepository ) { _userMapper = userMapper; _userRepository = userRepository; _refreshTokenRepository = refreshTokenRepository; _tokenOptions = tokenOptions.Value; }
public GetCommerceUserProcessor( ICustomerProvider customerProvider, IUserMapper userMapper, ILogService <CommonLog> logService) : base(logService) { Assert.ArgumentNotNull(customerProvider, nameof(customerProvider)); Assert.ArgumentNotNull(userMapper, nameof(userMapper)); this.customerProvider = customerProvider; this.userMapper = userMapper; }
public ManageUsersModel(IUserMapper userMapper) { if (userMapper == null) { throw new ArgumentNullException("userMapper"); } this.userMapper = userMapper; this.searchTask = Task.Factory.StartNew(() => { }); this.SearchResults = new ThreadSafeObservableCollection <GroupMemberModel>(); this.SearchResults.EnableSync(); }
public UserApiController( IPasswordService passwordService, IUserManager userManager, IUserProvider userProvider, IUserMapper userMapper ) { _passwordService = passwordService; _userManager = userManager; _userProvider = userProvider; _userMapper = userMapper; }
public ScriptMapper(IUserMapper userMapper, IOptionsMapper optionsMapper, ISectionMapper sectionMapper, ICookieParser cookieParser) { userMapper.CheckForNull("userMapper"); optionsMapper.CheckForNull("optionsMapper"); sectionMapper.CheckForNull("sectionMapper"); _userMapper = userMapper; _optionsMapper = optionsMapper; _sectionMapper = sectionMapper; _cookieParser = cookieParser; }
private void SetUpDependencies() { _userRepository = _administrationMockRepository.GetUserRepository(); _workshopRepository = _administrationMockRepository.GetWorkshopRepository(); _teamRepository = _administrationMockRepository.GetTeamRepository(); _cryptographerService = _administrationMockRepository.GetCryptographerService(); _userMapper = _administrationMockRepository.GetUserMapper(); _userValidator = _administrationMockRepository.GetUserValidator(true); _workshopMapper = _administrationMockRepository.GetWokshopMapper(); _teamMapper = _administrationMockRepository.GetTeamMapper(); _teamValidator = _administrationMockRepository.GetTeamValidator(true); _workshopValidator = _administrationMockRepository.GetWorkshopValidator(true); }
public void authenticate_user_bad_password() { //Create a new user: IUserMapper user = users_bll.Insert(new UserMapper { Name = "trump", RoleName = "user", password_hash = "thebestpassword" }); //Authenticate user: bool authentic = users_bll.authenticate_user(new UserMapper { Name = "trump", password_hash = "iloveputin" }); Assert.IsTrue(!authentic); }
public UserModule(IUserMapper userMapper, IUserBaseService userBaseService) { //获取新增用户 Post["/user/add"] = x => { var entity = this.Bind <UserBase>(); entity.Id = Guid.NewGuid().ToString(); entity.CreateTime = DateTime.Now; var data = userBaseService.AddUserBase(entity); return(Response.AsSuccessJson(data)); }; }
public void Get_User_by_User_Name() { //Create a new user: IUserMapper user = users_dal.Insert(new UserMapper { Name = "comey", RoleName = "user", password_hash = "hillarysemail" }); //Get the user back out: IUserMapper foundUser = users_dal.Get_User_by_User_Name(new UserMapper { Name = "comey" }); Assert.IsNotNull(foundUser); }
//CRUD functionality for 'Users' table: //Create: public IUserMapper Insert(IUserMapper user) { IUserMapper output = null; try { using (SqlConnection connection = new SqlConnection(ConnectionString)) { connection.Open(); using (SqlCommand command = new SqlCommand("insert_User", connection)) { command.CommandType = CommandType.StoredProcedure; //Add input parameters: command.Parameters.Add("@Name", SqlDbType.VarChar).Value = user.Name; command.Parameters.Add("@Role", SqlDbType.VarChar).Value = user.RoleName; command.Parameters.Add("@password_hash", SqlDbType.VarChar).Value = user.password_hash; //Setup output parameter for the returned User.Id: SqlParameter IdentityOutput = command.Parameters.Add("@IdentityOutput", SqlDbType.Int); IdentityOutput.Value = null; IdentityOutput.Direction = ParameterDirection.Output; //Setup output paramter for the returned Role.Id: SqlParameter RoleIDOutput = command.Parameters.Add("@RoleIDOutput", SqlDbType.Int); RoleIDOutput.Value = null; RoleIDOutput.Direction = ParameterDirection.Output; command.Prepare(); command.ExecuteNonQuery(); //Run the query. if (!(IdentityOutput.Value is DBNull)) { //Return the user that was created: output = new UserMapper(); output.Id = (int)IdentityOutput.Value; output.Name = user.Name; output.password_hash = user.password_hash; output.RoleName = user.RoleName; output.RoleId = (int)RoleIDOutput.Value; } } } } catch (SqlException e) { throw new SqlDALException("There was a problem with SQL. Please provide valid data. The Name, Rolename, and password_hash fields must be provided. The Name field must be unique.", e); } //Return the method output: If zero, that means there was a problem. return(output); }
public async void Get_All_Users() { IUserMapper user1 = users_bll.Insert(new UserMapper { Name = "Trump", RoleName = "user", password_hash = "thebestpassword" }); IUserMapper user2 = users_bll.Insert(new UserMapper { Name = "Melania", RoleName = "user", password_hash = "michelleObama" }); IUserMapper user3 = users_bll.Insert(new UserMapper { Name = "Ivanka", RoleName = "user", password_hash = "chineseproducts" }); List <IUserMapper> found_movies = await users_bll.Get_All_Users(); Assert.AreEqual(found_movies.Count, 4); }
public ManageController( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <ManageController> logger, UrlEncoder urlEncoder, IUserMapper userMapper) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; _urlEncoder = urlEncoder; _userMapper = userMapper; }
public UserService(IUserRepository repo, IAdvertRepository advertRepo, IUserValidator userValidator, IAdvertValidator advertValidator, IUserMapper userMapper, IAdvertMapper advertMapper, IOptions <AppSettings> appSettings) { _repo = repo; _advertRepo = advertRepo; _userValidator = userValidator; _advertValidator = advertValidator; _userMapper = userMapper; _advertMapper = advertMapper; _appSettings = appSettings.Value; }
public ActionResult Index() { //Get the session information: IUserMapper user = SessionHelper.getSession(); //Create a DashboardViewModel: DashboardViewModel viewModel = new DashboardViewModel(); //Set the user info into the viewmodel: viewModel.Id = user.Id; viewModel.Name = user.Name; viewModel.RoleId = user.RoleId; viewModel.RoleName = user.RoleName; viewModel.user = user; //Return to view with the viewmodel. return(View(viewModel)); }
public PreceptorTimeContextFactory() { //Notice that we are building ContextOptions using Guid.NewGuid().ToString() property as a database //name in order to provide a new, clean in-memory instance for each test class. var contextOptions = new DbContextOptionsBuilder <PreceptorTimeContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; EnsureCreation(contextOptions); ContextInstance = new TestPreceptorTimeContext(contextOptions); ReportMapper = new ReportMapper(); UserInfoMapper = new UserInfoMapper(); UserMapper = new UserMapper(); TimeEntryMapper = new TimeEntryMapper(UserMapper); }
public FormsAuthenticationModule( IUserMapper userMapper, IConfiguration configuration, IUserRepository userRepository, IViewRenderer viewRenderer, IModuleStaticWrappers moduleStaticWrappers) { Get[AuthenticationRedirectUrl.Url] = p => View[AuthenticationRedirectUrl.Url]; Post[AuthenticationRedirectUrl.Url] = p => userMapper.Authenticate( this, userMapper, configuration, userRepository, this.Bind <UserCredentials>(), viewRenderer, moduleStaticWrappers); }
/// <summary> /// Configures authentication for the specified <paramref name="pipelines"/> /// using the specified <paramref name="userMapper"/>. /// </summary> /// <param name="pipelines"></param> /// <param name="userMapper"></param> public static void RegisterAuthentication(IPipelines pipelines, IUserMapper userMapper) { Verify.NotNull(userMapper, nameof(userMapper)); var keyGenerator = new PassphraseKeyGenerator(KEY, Salt); var encryptionProvider = new RijndaelEncryptionProvider(keyGenerator); var hmacProvider = new DefaultHmacProvider(keyGenerator); var cryptographyConfiguration = new CryptographyConfiguration(encryptionProvider, hmacProvider); var formsConfiguration = new FormsAuthenticationConfiguration(cryptographyConfiguration) { RedirectUrl = "~/sign-in", UserMapper = userMapper }; FormsAuthentication.Enable(pipelines, formsConfiguration); }
public async void Get_All_Users() { //Create some movies: IUserMapper user1 = users_dal.Insert(new UserMapper { Name = "Jon Snow", RoleName = "user", password_hash = "thebestpassword" }); IUserMapper user2 = users_dal.Insert(new UserMapper { Name = "Trump", RoleName = "user", password_hash = "thebestpassword" }); IUserMapper user3 = users_dal.Insert(new UserMapper { Name = "Hillary", RoleName = "user", password_hash = "benghazi" }); //Get all the movies out of the database: List <IUserMapper> all_users = await users_dal.Get_All_Users(); Assert.IsTrue(all_users.Count == 4); }
public UserLoginAction( IDirectoryServicesConfigurationStore configurationStore, IDirectoryServicesCredentialValidator credentialValidator, IAuthCookieCreator issuer, IInvalidLoginTracker loginTracker, ISleep sleep, IApiActionModelBinder modelBinder, IApiActionResponseCreator responseCreator, IUserMapper userMapper) { this.configurationStore = configurationStore; this.credentialValidator = credentialValidator; this.issuer = issuer; this.loginTracker = loginTracker; this.sleep = sleep; this.modelBinder = modelBinder; this.responseCreator = responseCreator; this.userMapper = userMapper; }
public QAMapper(IUserMapper userMapper) { _userMapper = userMapper; }
public UserController(IUserService userService, IUserMapper userMapper) { _userService = userService; _userMapper = userMapper; }
public UsersController(IUsersApplication usersApplication, IUserMapper usersMapper) { _usersApplication = usersApplication; _userMapper = usersMapper; }
public ProjectController(IProjectService projectService,IUserService userService,IUserMapper userMapper) { this.userMapper = userMapper; this.userService = userService; this.projectService = projectService; }
/// <summary> /// Initializes a new instance of the <see cref="UserTasks"/> class. /// </summary> /// <param name="userRepository"> /// The user repository. /// </param> /// <param name="userMapper"> /// The user mapper. /// </param> /// <param name="identityService"> /// The identity Service. /// </param> public UserTasks(IUserRepository userRepository, IUserMapper userMapper, IIdentityService identityService) { this.userRepository = userRepository; this.userMapper = userMapper; this.identityService = identityService; }
public AccountService(IDocumentStore documentStore, IUserMapper userMapper) { _documentStore = documentStore; _userMapper = userMapper; }
public UserRepository(dynamic connection,IUserMapper mapper) { _connection = connection; _mapper = mapper; }
/// <summary> /// Creates a new instance of AuthSessionIdUserMapper. /// </summary> /// <param name="baseMapper">The standard user mapper that knows how to retrieve users by their default Id.</param> /// <param name="sessionIdStore">An implementation of IAuthSessionIdStore that will be used to map AuthSessionIds to User Ids</param> public AuthSessionIdUserMapper(IUserMapper baseMapper, IAuthSessionIdStore sessionIdStore) { this.baseMapper = baseMapper; this.sessionIdStore = sessionIdStore; }
public WorkshopMapper(IUserRepository userRepository, ITeamRepository teamRepository, IUserMapper userMapper) { _userRepository = userRepository; _teamRepository = teamRepository; }
public void SetUp() { _sut = new UserMapper(); }
public MessageMapper(IUserMapper userMapper) { _userMapper = userMapper; }
public VisitMapper(IUserMapper userMapper) { _userMapper = userMapper; }