MSAL cache plugin which enables callers to write the MSAL cache to disk on Windows, macOs, and Linux.

  • Persistence can be one of:
  • FilePersistence: Writes and reads from an unencrypted file. Can be used on Windows, macOs, or Linux.
  • FilePersistenceWithDataProtection: Used on Windows, writes and reads from file encrypted with windows dpapi-addon.
  • KeychainPersistence: Used on macOs, writes and reads from keychain.
  • LibSecretPersistence: Used on linux, writes and reads from secret service API. Requires libsecret be installed.

Hierarchy

  • PersistenceCachePlugin

Implements

Constructors

Properties

currentCache: null | string
lastSync: number
lockFilePath: string
persistence: IPersistence

Methods

  • Reads from storage and saves an in-memory copy. If persistence has not been updated since last time data was read, in memory copy is used.

    If cacheContext.cacheHasChanged === true, then file lock is created and not deleted until afterCacheAccess() is called, to prevent the cache file from changing in between beforeCacheAccess() and afterCacheAccess().

    Parameters

    Returns Promise<void>

Generated using TypeDoc