Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper
Helper to create the token cache
The name of the Default KeyRing collection. Secrets stored in this collection are persisted to disk
The name of the Session KeyRing collection. Secrets stored in this collection are not persisted to disk, but
will be available for the duration of the user session.
Gets the user's root directory across platforms.
Allows clients to listen for cache updates originating from disk.
public static Task<MsalCacheHelper> CreateAsync(StorageCreationProperties storageCreationProperties, TraceSource logger = null)
Creates a new instance of MsalCacheHelper. To configure MSAL to use this cache persistence, call RegisterCache
Clears the token store. Equivalent to a delete operation on the persistence layer (file delete).
Extracts the token cache data from the persistent store
Registers a token cache to synchronize with the persistent storage.
Saves an unencrypted, UTF-8 encoded byte array representing an MSAL token cache.
The save operation will persist the data in a secure location, as configured in StorageCreationProperties
Unregisters a token cache so it no longer synchronizes with on disk storage.
Performs a write -> read -> clear using the underlying persistence mechanism and
throws an MsalCachePersistenceException if something goes wrong.