예제 #1
0
 public UserDomainService(IDapperRepository <UserInfo, long> userRepository,
                          IDapperRepository <Role, long> roleRepository,
                          IDapperRepository <UserRole, long> userRoleRepository,
                          IDapperRepository <UserUserGroupRelation, long> userUserGroupRelationRoleRepository,
                          IDapperRepository <Menu, long> menuRepository,
                          IRoleDomainService roleDomainService,
                          IUserGroupDomainService userGroupDomainService,
                          IPasswordHelper passwordHelper,
                          IMenuDomainService menuDomainService,
                          ILockerProvider lockerProvider,
                          IDapperRepository <UserGroup, long> userGroupRepository,
                          IDapperRepository <UserGroupPermission, long> userGroupPermissionRepository,
                          IDapperRepository <UserGroupOrganization, long> userGroupOrganizationDapperRepository)
 {
     _userRepository     = userRepository;
     _roleRepository     = roleRepository;
     _userRoleRepository = userRoleRepository;
     _userUserGroupRelationRepository = userUserGroupRelationRoleRepository;
     _menuRepository                        = menuRepository;
     _roleDomainService                     = roleDomainService;
     _userGroupDomainService                = userGroupDomainService;
     _passwordHelper                        = passwordHelper;
     _menuDomainService                     = menuDomainService;
     _lockerProvider                        = lockerProvider;
     _userGroupRepository                   = userGroupRepository;
     _userGroupPermissionRepository         = userGroupPermissionRepository;
     _userGroupOrganizationDapperRepository = userGroupOrganizationDapperRepository;
     _session = NullSurgingSession.Instance;
 }
예제 #2
0
 public UserManager(IEmailService emailService, IAuthenticationService authenticationService, IPasswordHelper passwordHelper, ISession session)
 {
     this.emailService          = emailService;
     this.authenticationService = authenticationService;
     this.passwordHelper        = passwordHelper;
     this.session = session;
 }
예제 #3
0
 public UserController(IUserService userService, IPasswordHelper pwHelp, ICommentService commentService, IRestaurantService restaurantService)
 {
     _userService       = userService;
     _pwencrypt         = pwHelp;
     _commentService    = commentService;
     _restaurantService = restaurantService;
 }
예제 #4
0
 public LoginCommandHandler(ISignInManager signInManager, IPasswordHelper passwordHelper, IMemoryCache cache, IStaffRepository staffRepo)
 {
     _signInManager  = signInManager;
     _passwordHelper = passwordHelper;
     _cache          = cache;
     _staffRepo      = staffRepo;
 }
예제 #5
0
 public UserManager(IEmailService emailService, IAuthenticationService authenticationService, IPasswordHelper passwordHelper,ISession session)
 {
     this.emailService = emailService;
     this.authenticationService = authenticationService;
     this.passwordHelper = passwordHelper;
     this.session = session;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Factory"/> class.
 /// It will execute the <see cref="InitializeDatabase"/> method.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="passwordHelper">The password helper.</param>
 public Factory(AppDbContext context, IPasswordHelper passwordHelper)
 {
     Context         = context;
     _passwordHelper = passwordHelper;
     InitializeDatabase();
     Context.SaveChanges();
 }
 public TokenController(DbBackupServiceContext context, ITokenManager tokenManager, IConfiguration configuration, IPasswordHelper passwordHelper)
 {
     _Context        = context;
     _TokenManager   = tokenManager;
     _Configuration  = configuration;
     _PasswordHelper = passwordHelper;
 }
예제 #8
0
        //private IMailSender mailSender;
        //private IViewRenderService renderView;

        public UserService(IGenericRepository <User> userRepository, IPasswordHelper passwordHelper /*, IMailSender mailSender, IViewRenderService renderView*/)
        {
            this.userRepository = userRepository;
            this.passwordHelper = passwordHelper;
            //this.mailSender = mailSender;
            //this.renderView = renderView;
        }
예제 #9
0
 public WebPageHelper(IUserManager userManager, IStandardPricingTierManager standardPricingTierManager, IAccountTypeHelper accountTypeHelper, IPasswordHelper passwordHelper)
 {
     _userManager = userManager;
     _standardPricingTierManager = standardPricingTierManager;
     _accountTypeHelper          = accountTypeHelper;
     _passwordHelper             = passwordHelper;
 }
 public AccountController(IMediator mediator, IPasswordHelper passwordHelper, IConfiguration configuration, IViewRenderService viewRenderService)
 {
     _mediator          = mediator;
     _passwordHelper    = passwordHelper;
     _configuration     = configuration;
     _viewRenderService = viewRenderService;
 }
예제 #11
0
 public UserRepository(
     IOptions <AppSettings> appSettings,
     IPasswordHelper passwordHelper
     ) : base(appSettings)
 {
     this.passwordHelper = passwordHelper;
 }
예제 #12
0
 public ChangePasswordHandler(ICustomerService customerService, ISessionService sessionService,
                              ISessionHelper sessionHelper, IPasswordHelper passwordHelper)
 {
     _customerService = customerService;
     _sessionService  = sessionService;
     _sessionHelper   = sessionHelper;
     _passwordHelper  = passwordHelper;
 }
예제 #13
0
 public AuthenticationService(ISession session, IPasswordHelper passwordHelper, IBusinessManagerContainer businessManagerContainer)
 {
     this.session = session;
     this.passwordHelper = passwordHelper;
     this.businessManagerContainer = businessManagerContainer;
     this.MaximumPasswordAttemptsLimit = Convert.ToInt32(ConfigurationManager.AppSettings["MaxmimumPasswordAttempts"]);
     this.PasswordExpiryDays = Convert.ToInt32(ConfigurationManager.AppSettings["PasswordExpiryDays"]);
 }
예제 #14
0
        /// <summary>
        /// Convert a user to
        /// </summary>
        /// <param name="passwordHelper">The password helper.</param>
        /// <returns>The user.</returns>
        public User ToUser(IPasswordHelper passwordHelper)
        {
            var password = string.IsNullOrWhiteSpace(this.Password)
                               ? null
                               : passwordHelper.HashPassword(this.Password);

            return(new User(this.Id, this.Name, this.Email, password, new HashSet <string>(this.Roles)));
        }
예제 #15
0
 public UserLoginService(IServiceProvider provider,
                         IPasswordHelper passHelper,
                         IMobilePhoneFormatter _mobileFormatter,
                         IMSRepository <UserEntity> _userRepo) :
     base(provider, passHelper, _mobileFormatter, _userRepo)
 {
     //
 }
예제 #16
0
 public UserManager(IPropertyMappingService propertyMappingService, IPropertyCheckerService checker, IUnitOfWork uow,
                    IPasswordHelper passHelper)
 {
     _propertyMappingService = propertyMappingService;
     _servicePropertyChecker = checker;
     _uow        = uow;
     _passHelper = passHelper;
 }
예제 #17
0
 public UserServices(IGenericRepository <User> userRepository, IPasswordHelper passwordHelper, IMailSender mailSender, IViewRenderService renderView, IGenericRepository <UserRole> userRoleRepository)
 {
     _userRepository     = userRepository;
     _passwordHelper     = passwordHelper;
     _mailSender         = mailSender;
     _renderView         = renderView;
     _userRoleRepository = userRoleRepository;
 }
예제 #18
0
 public AuthenticationService(ISession session, IPasswordHelper passwordHelper, IBusinessManagerContainer businessManagerContainer)
 {
     this.session                      = session;
     this.passwordHelper               = passwordHelper;
     this.businessManagerContainer     = businessManagerContainer;
     this.MaximumPasswordAttemptsLimit = Convert.ToInt32(ConfigurationManager.AppSettings["MaxmimumPasswordAttempts"]);
     this.PasswordExpiryDays           = Convert.ToInt32(ConfigurationManager.AppSettings["PasswordExpiryDays"]);
 }
예제 #19
0
 private SettingsService()
 {
     _helper = new SettingsHelper();
     _passwordHelper = new PasswordHelper();
     if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
     {
         _isPhone = true;
     }
 }
예제 #20
0
 public LoginManager(IPasswordHelper passwordHelper,
                     IDapperRepository <UserInfo, long> userRepository,
                     IDapperRepository <Tenant, long> tenantRepository)
 {
     _passwordHelper   = passwordHelper;
     _userRepository   = userRepository;
     _tenantRepository = tenantRepository;
     _cacheProvider    = CacheContainer.GetService <ICacheProvider>(HeroConstants.CacheProviderKey);;
 }
예제 #21
0
 public UserService(IGenericRepository <User> userRepository, IPasswordHelper passwordHelper, IMailSender mailSender, IViewRenderService renderView, IWebHostEnvironment webHostEnviroment, IGenericRepository <UserRole> userRoleRepository, IGenericRepository <Role> roleRepository)
 {
     this.userRepository     = userRepository;
     this.passwordHelper     = passwordHelper;
     this.mailSender         = mailSender;
     this.renderView         = renderView;
     this.webHostEnviroment  = webHostEnviroment;
     this.userRoleRepository = userRoleRepository;
     this.roleRepository     = roleRepository;
 }
예제 #22
0
 public UserService(
     IUserRepository UserRepository,
     IPasswordHelper PasswordHelper,
     IJwtHelper JwtHelper
     )
 {
     userRepository = UserRepository;
     passwordHelper = PasswordHelper;
     jwtHelper      = JwtHelper;
 }
예제 #23
0
 public AccountService(IUserRepository userRepository, IPasswordHelper passwordHelper, IEmailHelper emailHelper,
                       IMapperHelper mapperHelper, IConfiguration configuration, IOptions <EmailConfig> emailConfig)
 {
     _userRepository = userRepository;
     _passwordHelper = passwordHelper;
     _emailHelper    = emailHelper;
     _mapperHelper   = mapperHelper;
     _configuration  = configuration;
     _emailConfig    = emailConfig;
 }
예제 #24
0
 public UserService(IUserRepository userRepository, IUserRoleRepository userRoleRepository, IUserRolePermissionRepository userRolePermissionRepository, IPasswordHelper passwordHelper, IMailSender mailSender, IViewRenderService renderView, IUserPermissionRepository userPermissionRepository)
 {
     _userRepository               = userRepository;
     _userRoleRepository           = userRoleRepository;
     _userRolePermissionRepository = userRolePermissionRepository;
     _passwordHelper               = passwordHelper;
     _mailSender = mailSender;
     _renderView = renderView;
     _userPermissionRepository = userPermissionRepository;
 }
예제 #25
0
 public Authenticator(ILogger logger,
                      IUserService userService,
                      IPasswordHelper passwordHelper,
                      ITokenHelper tokenHelper)
 {
     _logger         = logger;
     _userService    = userService;
     _passwordHelper = passwordHelper;
     _tokenHelper    = tokenHelper;
 }
예제 #26
0
        public SqliteDataContext CreateDbContext(IPasswordHelper passwordHelper)
        {
            var dbContext = new SqliteInMemoryAppDbContext(null);

            dbContext.Database.EnsureDeleted();
            dbContext.Database.EnsureCreated();

            Factory = new Factory(dbContext, passwordHelper);

            return(dbContext);
        }
예제 #27
0
 protected AdminLoginService(
     IWCloudContext <AdminLoginService> _context,
     IPasswordHelper passHelper,
     IMobilePhoneFormatter _mobileFormatter,
     IAdminAccountRepository _userRepo)
 {
     this._context               = _context;
     this._passHelper            = passHelper;
     this._mobileFormatter       = _mobileFormatter;
     this.adminAccountRepository = _userRepo;
 }
예제 #28
0
 protected LoginServiceBase(
     IServiceProvider provider,
     IPasswordHelper passHelper,
     IMobilePhoneFormatter _mobileFormatter,
     IMSRepository <T> _userRepo)
 {
     this.logger           = provider.Resolve_ <ILogger <LoginServiceBase <T> > >();
     this._passHelper      = passHelper;
     this._mobileFormatter = _mobileFormatter;
     this._userRepo        = _userRepo;
 }
예제 #29
0
 public UserService(
     IUserRepository userRepository,
     ITokenHelper tokenHelper,
     IPasswordHelper passwordHelper,
     IHashHelper hashHelper
     )
 {
     _userRepository = userRepository;
     _tokenHelper    = tokenHelper;
     _passwordHelper = passwordHelper;
     _hashHelper     = hashHelper;
 }
예제 #30
0
 public UserManager(IDapperRepository <UserInfo, long> userRepository,
                    IDapperRepository <UserRole, long> userRoleRepository,
                    IDapperRepository <UserGroupRelation, long> userGroupRelationRepository,
                    IServiceProxyProvider serviceProxyProvider,
                    IPasswordHelper passwordHelper)
 {
     _userRepository = userRepository;
     _userGroupRelationRepository = userGroupRelationRepository;
     _userRoleRepository          = userRoleRepository;
     _serviceProxyProvider        = serviceProxyProvider;
     _passwordHelper = passwordHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UserService"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="db">The database context.</param>
 /// <param name="appSettings">The application settings.</param>
 /// <param name="l">The string localizer.</param>
 /// <param name="lr">The resource localizer.</param>
 /// <param name="emailService">The email service.</param>
 /// <param name="passwordHelper">The password helper.</param>
 public UserService(ILogger <UserService> logger, AppDbContext db, IOptions <AppSettings> appSettings,
                    IStringLocalizer <Translation> l, IStringLocalizer <LocalizedResource> lr, IEmailService emailService,
                    IPasswordHelper passwordHelper)
 {
     _logger         = logger;
     _db             = db;
     _appSettings    = appSettings.Value;
     _l              = l;
     _lr             = lr;
     _emailService   = emailService;
     _passwordHelper = passwordHelper;
     _embedded       = new EmbeddedFileProvider(Assembly.GetExecutingAssembly());
 }
예제 #32
0
        public UserServiceTest()
        {
            var passwordHelperLocalizer = Substitute.For<IStringLocalizer<PasswordHelper>>();
            passwordHelperLocalizer[Arg.Any<string>()].Returns(p => new LocalizedString((string)p[0], (string)p[0]));

            _passwordHelper = new PasswordHelper(passwordHelperLocalizer);
            _totpService = new TimeBasedOneTimePasswordNuGetService();

            var dataHelper = new DataHelper();
            _db = dataHelper.CreateDbContext(_passwordHelper);
            _factory = dataHelper.Factory;

            _service = new UserService(_db, _totpService);
        }
예제 #33
0
        public PasswordTextBox(IPasswordHelper passwordHelper, IHistoryService historyService)
        {
            PasswordHelper = passwordHelper;
            HistoryService = historyService;

            UnmaskedConnectionString = string.Empty;
            Text  = string.Empty;
            stack = new StringHistoryStack(string.Empty, 0, 0);

            Handlers = new List <IEventHandler>();

            AutoCompleteMode   = AutoCompleteMode.Suggest;
            AutoCompleteSource = AutoCompleteSource.CustomSource;

            KeyPress    += OnKeyPressedInternal;
            TextChanged += TextChangedInternal;
        }
예제 #34
0
 public UserService(IUnitOfWork unitOfWork, IPasswordHelper passwordHelper)
 {
     _drinksContext = unitOfWork.DrinksContext;
     _passwordHelper = passwordHelper;
 }
예제 #35
0
 public UserManager(IPasswordHelper passwordHelper)
 {
     _passwordHelper = passwordHelper;
 }