Beispiel #1
0
 protected BaseController(IServiceProvider serviceProvider)
 {
     contentCache = serviceProvider.GetRequiredService <IContentCache>();
     rolesCache   = serviceProvider.GetRequiredService <IRolesCache>();
     userManager  = serviceProvider.GetRequiredService <SunUserManager>();
     keyGenerator = serviceProvider.GetRequiredService <CacheKeyGenerator>();
 }
Beispiel #2
0
 public JwtService(
     DataBaseConnection db,
     SunUserManager userManager,
     IRolesCache rolesCache,
     IOptions <JwtOptions> jwtOptions,
     ILoggerFactory loggerFactory) : base(db)
 {
     this.userManager = userManager;
     this.jwtOptions  = jwtOptions.Value;
     logger           = loggerFactory.CreateLogger <AccountController>();
     this.rolesCache  = rolesCache;
 }
 public SunJweHandler(
     IOptionsMonitor <SunJweOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     IRolesCache rolesCache,
     JweService jweService,
     JweBlackListService jweBlackListService,
     SunUserManager userManager) : base(options, logger, encoder, clock)
 {
     this.rolesCache          = rolesCache;
     this.jweService          = jweService;
     this.userManager         = userManager;
     this.jweBlackListService = jweBlackListService;
 }
Beispiel #4
0
 public JweService(
     DataBaseConnection db,
     SunUserManager userManager,
     IRolesCache rolesCache,
     ICryptService cryptService,
     IOptionsMonitor <JweOptions> jweOptions,
     IOptionsMonitor <GlobalOptions> globalOptions,
     ILoggerFactory loggerFactory) : base(db)
 {
     this.userManager   = userManager;
     this.cryptService  = cryptService;
     this.globalOptions = globalOptions;
     this.jweOptions    = jweOptions;
     logger             = loggerFactory.CreateLogger <AccountController>();
     this.rolesCache    = rolesCache;
 }
Beispiel #5
0
 public JweService(
     DataBaseConnection db,
     SunUserManager userManager,
     IRolesCache rolesCache,
     ICryptService cryptService,
     IOptionsMonitor <SecurityOptions> securityOptions,
     IOptionsMonitor <UrlPathsOptions> urlsOptions,
     ILoggerFactory loggerFactory) : base(db)
 {
     this.userManager     = userManager;
     this.cryptService    = cryptService;
     this.urlsOptions     = urlsOptions;
     this.securityOptions = securityOptions;
     logger          = loggerFactory.CreateLogger <AccountController>();
     this.rolesCache = rolesCache;
 }