Example #1
0
        public RedisAuthenticationSessionStore(IRedisConnection redisConnection, IAuthenticationTicketSerializer serializer)
        {
            Guard.Against <ArgumentNullException>(redisConnection.IsNull(), "redisConnection can't be null");
            Guard.Against <ArgumentNullException>(serializer.IsNull(), "serializer can't be null");

            this.redisConnection = redisConnection;
            this.serializer      = serializer;
        }
        public InMemoryAuthenticationSessionStore(IAuthenticationTicketSerializer serializer)
        {
            Guard.Against <ArgumentNullException>(serializer.IsNull(), "serializer can't be null");

            this.serializer          = serializer;
            this.store               = new ConcurrentDictionary <string, string>();
            this.garbageCollectTimer = new Timer(new TimerCallback(this.GarbageCollect), null, TimeSpan.FromMinutes(15), TimeSpan.FromMinutes(15));
        }