public InMemoryCache(ITokenCache tokenCache) { tokenCache?.SetBeforeAccess(BeforeAccessHandler); tokenCache?.SetAfterAccess(AfterAccessHandler); }
public void Initialize(ITokenCache tokenCache) { tokenCache.SetBeforeAccess(BeforeAccessNotification); tokenCache.SetAfterAccess(AfterAccessNotification); tokenCache.SetBeforeWrite(BeforeWriteNotification); }
public void Bind(ITokenCache tokenCache) { tokenCache.SetBeforeAccess(BeforeAccessNotification); tokenCache.SetAfterAccess(AfterAccessNotification); }
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); }