Ejemplo n.º 1
0
 public AccountService(IUserRepository userRepository, IPasswordEncrypter passwordEncrypter,
                       IRoleRepository roleRepository)
 {
     _userRepository    = userRepository;
     _passwordEncrypter = passwordEncrypter;
     _roleRepository    = roleRepository;
 }
Ejemplo n.º 2
0
 public AuthenticationService(IPasswordEncrypter passwordEncrypter,
                              IDataContext dataContext,
                              IJwtService jwtService)
 {
     this.passwordEncrypter = passwordEncrypter;
     this.dataContext       = dataContext;
     this.jwtService        = jwtService;
 }
Ejemplo n.º 3
0
 public UsersService(IAppEntityRepository <User> usersRepository,
                     IDataContext dataContext,
                     ICurrentUser currentUser,
                     IPasswordEncrypter passwordEncrypter)
 {
     this.usersRepository   = usersRepository;
     this.dataContext       = dataContext;
     this.currentUser       = currentUser;
     this.passwordEncrypter = passwordEncrypter;
 }
Ejemplo n.º 4
0
        private IEnumerable <User> GetAdmins(SeedSettings settings, IPasswordEncrypter passwordEncrypter)
        {
            var password = passwordEncrypter.Encrypt(settings.DefaultAdmin.Password);

            yield return(new User()
            {
                Email = settings.DefaultAdmin.Email,
                FirstName = settings.DefaultAdmin.FirstName,
                LastName = settings.DefaultAdmin.LastName,
                Password = password,
                UserRoles = new List <UserRole> {
                    new UserRole {
                        Role = Role.Admin
                    }
                }
            });
        }
Ejemplo n.º 5
0
 public AccountService(IUsersService usersService,
                       IAuthenticationService authenticationService,
                       IPasswordEncrypter passwordEncrypter,
                       IAppEntityRepository <User> usersRepository,
                       IDataContext dataContext,
                       IEmailService emailService,
                       IBase64TextConverter base64TextConverter,
                       IPasswordGenerator passwordGenerator)
 {
     this.usersService          = usersService;
     this.authenticationService = authenticationService;
     this.passwordEncrypter     = passwordEncrypter;
     this.usersRepository       = usersRepository;
     this.dataContext           = dataContext;
     this.emailService          = emailService;
     this.base64TextConverter   = base64TextConverter;
     this.passwordGenerator     = passwordGenerator;
 }
Ejemplo n.º 6
0
 public AccountController(IAuthProvider authProvider,
                          IPasswordValidator passwordValidator,
                          IPasswordEncrypter passwordEncryptor,
                          IUsersRepository userRepository,
                          IMobileNumbersRepository mobileNumberRepository,
                          IProfilesRepository profilesRepository,
                          IOrdersRepository ordersRepository,
                          IRolesRepository rolesRepository
                          )
 {
     _authProvider            = authProvider;
     _passwordValidator       = passwordValidator;
     _passwordEncryptor       = passwordEncryptor;
     _userRepository          = userRepository;
     _mobileNumbersRepository = mobileNumberRepository;
     _profilesRepository      = profilesRepository;
     _ordersRepository        = ordersRepository;
     _rolesRepository         = rolesRepository;
 }
 public CreateAccountHandler(RegistrationDbContext dbContext, IMapper mapper, IPasswordEncrypter passwordEncrypter) : base(dbContext, mapper)
 {
     PasswordEncrypter = passwordEncrypter ?? throw new ArgumentNullException(nameof(passwordEncrypter));
 }
Ejemplo n.º 8
0
 public AdminPasswordValidator(IPasswordEncrypter passwordEncrypter)
     : base(passwordEncrypter)
 {
 }
Ejemplo n.º 9
0
 public UserPasswordValidator(IPasswordEncrypter passwordEncrypter)
 {
     _passwordEncrypter = passwordEncrypter;
 }
Ejemplo n.º 10
0
 public MainForm(IDataAccess dataAccess, IPasswordEncrypter passwordEncrypter)
 {
     InitializeComponent();
     _dataAccess        = dataAccess;
     _passwordEncrypter = passwordEncrypter;
 }