예제 #1
0
 public ClientLoginService(IClientRepository repository, IJwtBearerService jwtBearer,
                           IPasswordHasherService passwordHasher)
 {
     _repository     = repository;
     _jwtBearer      = jwtBearer;
     _passwordHasher = passwordHasher;
 }
예제 #2
0
 public AuthRepository(UserContext userContext,
                       IPasswordHasherService passwordHasherService,
                       ILogger <AuthRepository> iLogger)
 {
     this._userContext    = userContext;
     this._passwordHasher = passwordHasherService;
     this._iLogger        = iLogger ?? throw new ArgumentNullException(nameof(iLogger));
 }
예제 #3
0
 public UsersController(
     IUserRepository userRepository,
     IPasswordHasherService passwordHasher,
     ITokenService tokenService)
 {
     _userRepository = userRepository;
     _passwordHasher = passwordHasher;
     _tokenService   = tokenService;
 }
 public AuthorizationCommandHandler(IUnitOfWork uow, IDomainNotification notifications,
                                    JwtTokenConfig jwtTokenConfig, IUserRepository userRepository, IPasswordHasherService passwordHasherService,
                                    IShopperRepository shopperRepository) : base(uow, notifications)
 {
     _jwtTokenConfig        = jwtTokenConfig;
     _userRepository        = userRepository;
     _passwordHasherService = passwordHasherService;
     _shopperRepository     = shopperRepository;
 }
예제 #5
0
 public UserController(
     IPasswordHasherService passwordHasherService,
     IUserService userService
     , ICloudDinaryService cloudinaryService)
 {
     this._passwordHasherService = passwordHasherService;
     _userService       = userService;
     _cloudinaryService = cloudinaryService;
 }
 public AuthenticationController(
     IPasswordHasherService <User> passwordHasherService,
     IUserRepository <User, UserFilter, UserSpecification> userRepository,
     IStringLocalizer <SignInViewModel> localizer)
 {
     _passwordHasherService = passwordHasherService;
     _userRepository        = userRepository;
     _localizer             = localizer;
 }
 public ShopperCommandHandler(IUnitOfWork uow, IDomainNotification notifications, IUserRepository userRepository,
                              IPasswordHasherService passwordHasherService, IShopperRepository shopperRepository,
                              IShopperAddressRepository shopperAddressRepository) : base(uow,
                                                                                         notifications)
 {
     _userRepository           = userRepository;
     _passwordHasherService    = passwordHasherService;
     _shopperRepository        = shopperRepository;
     _shopperAddressRepository = shopperAddressRepository;
 }
예제 #8
0
 public UserTokenService(IUnitOfWork unitOfWork,
                         ISecurityService securityService,
                         IPasswordHasherService passwordHasherService)
 {
     _unitOfWork            = unitOfWork;
     _securityService       = securityService;
     _passwordHasherService = passwordHasherService;
     _tokens = _unitOfWork.Set <UserToken>();
     _users  = _unitOfWork.Set <User>();
 }
예제 #9
0
 public Authentication(IRepository <User> userRepo,
                       IPasswordHasherService hasher,
                       IPasswordRegex passwordRegex,
                       ITokenAuthentication tokenAuth,
                       IHttpContextAccessor httpContextAccessor) : base(userRepo, tokenAuth, httpContextAccessor)
 {
     _userRepo      = userRepo;
     _hasher        = hasher;
     _passwordRegex = passwordRegex;
     _tokenAuth     = tokenAuth;
 }
예제 #10
0
 public UserService(NotificationContext notificationContext,
                    IConfiguration configuration,
                    IMapper mapper,
                    IPasswordHasherService passwordService,
                    IUserRepository userRepository)
 {
     _mapper = mapper;
     _notificationContext = notificationContext;
     _configuration       = configuration;
     _userRepository      = userRepository;
     _notificationContext = notificationContext;
     _passwordService     = passwordService;
 }
예제 #11
0
 public UserService(IUnitOfWork unitOfWork,
                    IMapper mapper,
                    IPasswordHasherService passwordHasherService,
                    IRoleManager roleManager,
                    IRoleService roleService) : base(unitOfWork, mapper)
 {
     _unitOfWork            = unitOfWork;
     _mapper                = mapper;
     _passwordHasherService = passwordHasherService;
     _roleManager           = roleManager;
     _roleService           = roleService;
     _users     = unitOfWork.Set <User>();
     _userRoles = unitOfWork.Set <UserRole>();
 }
        public RegistrationService(PublicContext publicContext, IHttpContextAccessor httpContextAccessor, IMailClient mailClient, IPasswordHasherService passwordHasherService)
        {
            _publicContext         = publicContext;
            _httpContextAccessor   = httpContextAccessor;
            _mailClient            = mailClient;
            _passwordHasherService = passwordHasherService;

            _hasNumber        = new Regex(@"[0-9]+", RegexOptions.Compiled | RegexOptions.IgnoreCase);
            _hasUpperChar     = new Regex(@"[A-Z]+", RegexOptions.Compiled | RegexOptions.IgnoreCase);
            _hasMinimum8Chars = new Regex(@".{8,}", RegexOptions.Compiled | RegexOptions.IgnoreCase);


            _emailRegex = new Regex(@"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\"")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
        }
예제 #13
0
 public SetPasswordController(
     IEmailValidatorService emailValidatorService,
     IPasswordValidatorService passwordValidatorService,
     IPasswordHasherService <User> passwordHasherService,
     IUserRepository <User, UserFilter, UserSpecification> userRepository,
     IUserPasswordRepository <UserDTO> userPasswordRepository,
     IStringLocalizer <SetPasswordViewModel> localizer)
 {
     _emailValidatorService    = emailValidatorService;
     _passwordValidatorService = passwordValidatorService;
     _passwordHasherService    = passwordHasherService;
     _userRepository           = userRepository;
     _userPasswordRepository   = userPasswordRepository;
     _localizer = localizer;
 }
예제 #14
0
 public UserController(
     IPasswordValidatorService passwordValidatorService,
     IPasswordHasherService <TUser> passwordHasherService,
     IEmailValidatorService emailValidatorService,
     IUserRepository <TUser, UserFilter, UserSpecification> userRepository,
     IUserRoleRepository <UserRole> userRoleRepository,
     IMediator mediator,
     IStringLocalizer <TUser> localizer)
 {
     _passwordValidatorService = passwordValidatorService;
     _passwordHasherService    = passwordHasherService;
     _emailValidatorService    = emailValidatorService;
     _userRepository           = userRepository;
     _userRoleRepository       = userRoleRepository;
     _mediator  = mediator;
     _localizer = localizer;
 }
예제 #15
0
 public UserCommandHandler(IUnitOfWork uow, IDomainNotification notifications,
                           IUserRepository userRepository, IPasswordHasherService passwordHasherService) : base(uow, notifications)
 {
     _userRepository        = userRepository;
     _passwordHasherService = passwordHasherService;
 }
 public AuthenticationService(PublicContext publicContext, IPasswordHasherService passwordHasherService)
 {
     _context = publicContext;
     _passwordHasherService = passwordHasherService;
 }
예제 #17
0
 public ClientRegisterService(IClientRepository repository, IPasswordHasherService passwordHasher)
 {
     _repository     = repository;
     _passwordHasher = passwordHasher;
 }
예제 #18
0
 public UserService(AdCampaignContext context, IPasswordHasherService passwordHasherService)
 {
     _context = context;
     _passwordHasherService = passwordHasherService;
 }
예제 #19
0
 public UserMap(IPasswordHasherService passwordHasherService)
 {
     _passwordHasherService = passwordHasherService;
 }
예제 #20
0
 public UserSeeder(UserContext userContext, IPasswordHasherService passwordHasher, ITokenService iTokenService)
 {
     this._userContext    = userContext ?? throw new ArgumentNullException(nameof(userContext));
     this._passwordHasher = passwordHasher ?? throw new ArgumentNullException(nameof(passwordHasher));
     this._iTokenService  = iTokenService ?? throw new ArgumentNullException(nameof(iTokenService));
 }