コード例 #1
0
 public AuthenticaitonMiddleware(OcelotRequestDelegate next,
                                 IOcelotLoggerFactory loggerFactory,
                                 ICustomAuthenticateService authenticateService,
                                 OcelotConfiguration options)
     : base(loggerFactory.CreateLogger <AuthenticaitonMiddleware>())
 {
     _next = next;
     _authenticateService = authenticateService;
     _options             = options;
 }
コード例 #2
0
 public TokenRefreshMiddleware(OcelotRequestDelegate next,
                               IOcelotLoggerFactory loggerFactory,
                               ICustomTokenRefreshService refreshService,
                               OcelotConfiguration options)
     : base(loggerFactory.CreateLogger <AuthenticaitonMiddleware>())
 {
     _next                = next;
     _options             = options;
     _tokenRefreshService = refreshService;
 }
コード例 #3
0
        public OcelotRedisCache(OcelotConfiguration options)
        {
            _options = options;
            CSRedisClient redisClient = null;

            if (options.RedisConnectStrings.Length == 1)
            {
                redisClient = new CSRedisClient(options.RedisConnectStrings[0]);
            }
            else
            {
                Func <string, string> keyFunc = null;
                redisClient = new CSRedisClient(keyFunc, options.RedisConnectStrings);
            }

            RedisHelper.Initialization(redisClient);
        }
コード例 #4
0
 public OcelotCache(OcelotConfiguration options, ICache cache)
 {
     _options = options;
     _cache   = cache;
 }
コード例 #5
0
        //get configuration from db

        public MysqlFileConfigurationRepository(OcelotConfiguration configuration)
        {
            _configuration = configuration;
        }