Example #1
0
 public HomeController(IUsyAppRepository appRepository, IRedisCacheService redisCache, ICacheService memoryCache, IHostingEnvironment env)
 {
     log            = LogManager.GetLogger(Startup.log4netRepository.Name, typeof(HomeController));
     _appRepository = appRepository;
     _redisCache    = redisCache;
     _memoryCache   = memoryCache;
     _env           = env;
 }
        public JwtAuthController(IOptions <JwtIssuerOptions> jwtoptions, IUsyAppRepository appRepository)
        {
            _jwtOptions = jwtoptions.Value;
            ThrowIfInvalidOptions(_jwtOptions); //验证jwt配置是否合法

            _seriallizerSettings = new JsonSerializerSettings
            {
                Formatting = Formatting.Indented
            };

            _appRepository = appRepository;
        }