예제 #1
0
 public TokenProvider(IOptions <TokenProviderOptions> options, IUserRepositoryService userRepositoryService, IRefreshTokenRepositoryService refreshTokenRepositoryService, IUnitOfWork unitOfWork)
 {
     this.tokenProviderOptions          = options.Value;
     this.userRepositoryService         = userRepositoryService;
     this.refreshTokenRepositoryService = refreshTokenRepositoryService;
     this.unitOfWork = unitOfWork;
 }
예제 #2
0
        public UserServiceTest()
        {
            _passwordHash                  = A.Fake <IPasswordHashService>();
            _userRepositoryService         = A.Fake <IUserRepositoryService>();
            _jwtService                    = A.Fake <IJsonWebTokenService>();
            _httpRequestParser             = A.Fake <IHttpRequestParser>();
            _emailService                  = A.Fake <IEmailService>();
            _factorAuthenticatorManager    = A.Fake <ITwoFactorAuthenticatorManager>();
            _loginAttemptRepoService       = A.Fake <ILoginAttemptsRepositoryService>();
            _refreshTokenRepositoryService = A.Fake <IRefreshTokenRepositoryService>();
            _whiteListRepostirotyService   = A.Fake <IWhitelistedIpRepositoryService>();

            _userService = new UserService
                           (
                _userRepositoryService,
                _passwordHash,
                _jwtService,
                _httpRequestParser,
                _emailService,
                _factorAuthenticatorManager,
                _whiteListRepostirotyService,
                _loginAttemptRepoService,
                _refreshTokenRepositoryService
                           );
        }
예제 #3
0
 public UserController(IUnitOfWork unitOfWork,
                       IUserRepositoryService userRepositoryService,
                       ITokenProvider tokenProvider)
 {
     this.unitOfWork            = unitOfWork;
     this.userRepositoryService = userRepositoryService;
     this.tokenProvider         = tokenProvider;
 }
예제 #4
0
 public UsersController(IUnitOfWork unitOfWork, IUserRepositoryService userRepositoryService, ITokenProvider tokenProvider, IUserManagementService userManagementService, IRentBookRepositoryService rentBookRepositoryService)
 {
     this.unitOfWork                = unitOfWork;
     this.userRepositoryService     = userRepositoryService;
     this.tokenProvider             = tokenProvider;
     this.userManagementService     = userManagementService;
     this.rentBookRepositoryService = rentBookRepositoryService;
 }
        public SystemAdminController(IUserRepositoryService userRepository, IShopRepositoryService shopRepository, IUserAssignmentService userAssignmentService)
        {
            if (userRepository == null)
            {
                throw new ArgumentNullException(nameof(userRepository));
            }
            if (shopRepository == null)
            {
                throw new ArgumentNullException(nameof(shopRepository));
            }
            if (userAssignmentService == null)
            {
                throw new ArgumentNullException(nameof(userAssignmentService));
            }

            _userRepository        = userRepository;
            _shopRepository        = shopRepository;
            _userAssignmentService = userAssignmentService;
        }
예제 #6
0
 public UserService
 (
     IUserRepositoryService userRepositoryService,
     IPasswordHashService passwordHashService,
     IJsonWebTokenService jwtService,
     IHttpRequestParser httpRequestParser,
     IEmailService emailService,
     ITwoFactorAuthenticatorManager factorAuthenticatorManager,
     IWhitelistedIpRepositoryService whitelistedIpRepositoryService,
     ILoginAttemptsRepositoryService loginAttemptsRepositoryService,
     IRefreshTokenRepositoryService refreshTokenRepositoryService
 )
 {
     _userRepositoryService          = userRepositoryService;
     _passwordHashService            = passwordHashService;
     _jwtService                     = jwtService;
     _httpRequestParser              = httpRequestParser;
     _emailService                   = emailService;
     _factorAuthenticatorManager     = factorAuthenticatorManager;
     _whitelistedIpRepositoryService = whitelistedIpRepositoryService;
     _loginAttemptsRepositoryService = loginAttemptsRepositoryService;
     _refreshTokenRepositoryService  = refreshTokenRepositoryService;
 }
예제 #7
0
 public UserLookupService(IUserRepositoryService userRepositoryService)
 {
     _userRepositoryService = userRepositoryService;
 }
예제 #8
0
 public HomeController(IUserRepositoryService userDataHandler)
 {
     getUserDataHandler = userDataHandler;
 }
예제 #9
0
 public HomeController(ITokenService tokenService, IUserRepositoryService userRepositoryService, IConfiguration config)
 {
     _tokenService          = tokenService;
     _userRepositoryService = userRepositoryService;
     _configuration         = config;
 }