Exemple #1
0
 public ExceptionHandlerMiddleware(RequestDelegate next, ILogger <ExceptionHandlerMiddleware> logger,
                                   IJWTAuthenticationService jwtService)
 {
     _next       = next;
     _logger     = logger;
     _jwtService = jwtService;
 }
 public JWTAuthenticationHandler(IOptionsMonitor <JWTAuthenticationOptions> options,
                                 ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock,
                                 IJWTAuthenticationService jwtService, IUserContext userContext)
     : base(options, logger, encoder, clock)
 {
     _jwtService  = jwtService;
     _userContext = userContext;
 }
Exemple #3
0
 public UserService(IConfiguration config, IJWTAuthenticationService JWTAuthService, ICache <User> cache)
 {
     this._configuration            = config;
     this._JWTAuthenticationService = JWTAuthService;
     MongoDatabase = _configuration.GetConnectionString("Database");
     dbClient      = new MongoClient(MongoDatabase);
     database      = dbClient.GetDatabase("IMS");
     collection    = database.GetCollection <User>("users");
     cacheService  = cache;
 }
 public AuthController(IUsosService usosService, IJWTAuthenticationService jwtService,
                       IAsyncRepository <User> userRepository, IOptions <UsosServiceOptions> usosOptions,
                       IOptions <ApplicationOptions> appOptions, IMapper mapper, IThesisService thesisService)
 {
     _usosService    = usosService;
     _jwtService     = jwtService;
     _userRepository = userRepository;
     _usosOptions    = usosOptions.Value;
     _appOptions     = appOptions.Value;
     _mapper         = mapper;
     _thesisService  = thesisService;
 }