public InMemoryCache(ITokenCache tokenCache)
 {
     tokenCache?.SetBeforeAccess(BeforeAccessHandler);
     tokenCache?.SetAfterAccess(AfterAccessHandler);
 }
Exemplo n.º 2
0
 public void Initialize(ITokenCache tokenCache)
 {
     tokenCache.SetBeforeAccess(BeforeAccessNotification);
     tokenCache.SetAfterAccess(AfterAccessNotification);
     tokenCache.SetBeforeWrite(BeforeWriteNotification);
 }
Exemplo n.º 3
0
 public void Bind(ITokenCache tokenCache)
 {
     tokenCache.SetBeforeAccess(BeforeAccessNotification);
     tokenCache.SetAfterAccess(AfterAccessNotification);
 }
Exemplo n.º 4
0
 internal static void EnableSerialization(ITokenCache tokenCache)
 {
     tokenCache.SetBeforeAccess(BeforeAccessNotification);
     tokenCache.SetAfterAccess(AfterAccessNotification);
 }
 /// <summary>Initializes this instance of TokenCacheProvider with essentials to initialize themselves.</summary>
 /// <param name="tokenCache">The token cache instance of MSAL application</param>
 /// <param name="httpcontext">The Httpcontext whose Session will be used for caching.This is required by some providers.</param>
 /// <param name="user">The signed-in user for whom the cache needs to be established. Not needed by all providers.</param>
 public void Initialize(ITokenCache tokenCache, HttpContext httpcontext, ClaimsPrincipal user)
 {
     tokenCache.SetBeforeAccess(this.UserTokenCacheBeforeAccessNotification);
     tokenCache.SetAfterAccess(this.UserTokenCacheAfterAccessNotification);
     tokenCache.SetBeforeWrite(this.UserTokenCacheBeforeWriteNotification);
 }