Exemplo n.º 1
0
 public AuthenticaitonMiddleware(OcelotRequestDelegate next,
                                 IOcelotLoggerFactory loggerFactory,
                                 ICustomAuthenticateService authenticateService,
                                 OcelotConfiguration options)
     : base(loggerFactory.CreateLogger <AuthenticaitonMiddleware>())
 {
     _next = next;
     _authenticateService = authenticateService;
     _options             = options;
 }
Exemplo n.º 2
0
 public TokenRefreshMiddleware(OcelotRequestDelegate next,
                               IOcelotLoggerFactory loggerFactory,
                               ICustomTokenRefreshService refreshService,
                               OcelotConfiguration options)
     : base(loggerFactory.CreateLogger <AuthenticaitonMiddleware>())
 {
     _next                = next;
     _options             = options;
     _tokenRefreshService = refreshService;
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public OcelotCache(OcelotConfiguration options, ICache cache)
 {
     _options = options;
     _cache   = cache;
 }
Exemplo n.º 5
0
        //get configuration from db

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