protected BaseController(IServiceProvider serviceProvider) { contentCache = serviceProvider.GetRequiredService <IContentCache>(); rolesCache = serviceProvider.GetRequiredService <IRolesCache>(); userManager = serviceProvider.GetRequiredService <SunUserManager>(); keyGenerator = serviceProvider.GetRequiredService <CacheKeyGenerator>(); }
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; }
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; }
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; }