/// <summary>
 /// Initializes a new instance of the <see cref="AuthenticateRepositoryTests"/> class.
 /// </summary>
 public AuthenticateRepositoryTests()
 {
     this.httpClientHelper = new Mock<IHttpClientHelper>();
     Business.Dependencies.Register();
     DIContainer.Instance.RegisterInstance<IHttpClientHelper>(this.httpClientHelper.Object);
     this.authenticateRepository = DIContainer.Instance.Resolve<IAuthenticateRepository>();
 }
        public AuthenticateUserHandler(IOptions <TokenOptions> jwtOptions, IAuthenticateRepository repository)
        {
            _repository   = repository;
            _tokenOptions = jwtOptions.Value;

            if (_tokenOptions == null)
            {
                throw new ArgumentNullException(nameof(_tokenOptions));
            }

            if (_tokenOptions.ValidFor <= TimeSpan.Zero)
            {
                throw new ArgumentException("O período deve ser maior que zero", nameof(TokenOptions.ValidFor));
            }

            if (_tokenOptions.SigningCredentials == null)
            {
                throw new ArgumentNullException(nameof(SigningCredentials));
            }

            if (_tokenOptions.JtiGenerator == null)
            {
                throw new ArgumentNullException(nameof(TokenOptions.JtiGenerator));
            }
        }
Пример #3
0
 public AuthenticateBS(IAuthenticateRepository authenticateRepository)
 {
     if (_authenticate == null)
     {
         _authenticate = authenticateRepository;
     }
 }
 public AuthenticateService(IAuthenticateRepository authenticateRepository)
 {
     _authenticateRepository = authenticateRepository;
 }
Пример #5
0
 public AccountController(AuthenticateUserHandler authenticationHandler, IAuthenticateRepository authenticateRepository)
 {
     _handler = authenticationHandler;
     _authenticateRepository = authenticateRepository;
 }
Пример #6
0
 /// <summary>
 /// UserRepository constructor
 /// </summary>
 /// <param name="repository">repository</param>
 public UserRepository(IGenericRepository <User> repository, IAuthenticateRepository <User> authenticateRepository)
 {
     _repository             = repository;
     _authenticateRepository = authenticateRepository;
 }
Пример #7
0
 public UserService(IOptions <JwtSettings> options, IAuthenticateRepository authenticateRepository)
 {
     _appSettings            = options.Value;
     _authenticateRepository = authenticateRepository;
 }
Пример #8
0
 public HomeController(IAuthenticateRepository authenticateRepository)
 {
     _authenticateRepository = authenticateRepository;
 }
Пример #9
0
 public SessionService(IAuthenticateRepository authenticateRepository)
 {
     _authenticateRepository = authenticateRepository;
 }
 public LoginUser(IOutputHandler outputHandler, IAuthenticateRepository authenticateRepository, IConfiguration configuration)
 {
     OutputHandler            = outputHandler;
     AuthenticationRepository = authenticateRepository;
     Configuration            = configuration;
 }
Пример #11
0
 public Authenticate(IAuthenticateRepository authrep, IPinRepository pinrepo, IStaffGateway gateway)
 {
     authRepo     = authrep;
     iPinRepo     = pinrepo;
     staffGateway = gateway;
 }
 public AuthenticationController(IAuthenticateRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Пример #13
0
 public AdminPageController(IAuthenticateRepository authenticateRepository, IAdminPageRepository adminPageRepository)
 {
     authenticateProvider = authenticateRepository;
     adminPageProvider = adminPageRepository;
 }
Пример #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticateManager"/> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 public AuthenticateManager(IAuthenticateRepository repository)
 {
     this.authenticateRepository = repository;
 }
 public AuthenticateController(IAuthenticateRepository context)
 {
     _context = context;
 }
Пример #16
0
 public AuthController(ILogger <SecurityController> logger, ICryptoRSA cryptoService, IAuthenticateRepository <RegisterForm, LoginForm, User> authRepository)
 {
     _authRepository = authRepository;
     _logger         = logger;
     _cryptoService  = cryptoService;
 }