Exemplo n.º 1
0
        public DistributedTokenCache(IDistributedCache cache, ITokenCacheKeyProvider cacheKeyProvider)
        {
            this.cacheKey = cacheKeyProvider.Key;
            this.cache    = cache;

            BeforeAccess = OnBeforeAccess;
            AfterAccess  = OnAfterAccess;
        }
 public NaiveSessionBasedTokenCache(IHttpContextAccessor httpContextAccessor, ITokenCacheKeyProvider cacheKeyProvider)
 {
     CacheKey          = cacheKeyProvider.Key;
     Session           = httpContextAccessor.HttpContext.Session;
     this.AfterAccess  = AfterAccessNotification;
     this.BeforeAccess = BeforeAccessNotification;
     Load();
 }