TheCloudlessSky / Harbour.RedisSessionStateStore

A Redis based SessionStateStoreProvider written in C# using ServiceStack.Redis.
MIT License
166 stars 76 forks source link

Authorization on Redis server #16

Closed KirylKovaliov closed 10 years ago

KirylKovaliov commented 10 years ago

Is it possible to authorize on Redis server using Harbour.RedisSessionStateStore? It seems current implementation doesn't support it.

KirylKovaliov commented 10 years ago

After reading the code for a while I've found an answer. Authorization could be done by using @ character:

ex. localhost:6379@password

TheCloudlessSky commented 10 years ago

Yup:

protected void Application_Start()
{
    this.clientManager = new PooledRedisClientManager("password@redisServer:6379");
    RedisSessionStateStoreProvider.SetClientManager(this.clientManager);
}

...

All of that is configured with the Redis library, ServiceStack.Redis.