UNPKG

@azure/static-web-apps-cli

Version:
32 lines 1.31 kB
import { TokenCachePersistenceOptions } from "@azure/identity"; import { ICachePlugin, TokenCacheContext } from "@azure/msal-common"; export interface SWACLIPersistenceCacheOptions { enableCache: boolean; clearCache: boolean; } /** * SWA CLI cache plugin which enables callers to write the MSAL cache to disk on Windows, * macOs, and Linux using native keychain. */ export declare class SWACLIPersistenceCachePlugin implements ICachePlugin { private options; constructor(options: TokenCachePersistenceOptions); /** * Reads from storage and saves an in-memory copy. If keychain 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(). */ beforeCacheAccess(cacheContext: TokenCacheContext): Promise<void>; /** * Writes to storage if MSAL in memory copy of cache has been changed. */ afterCacheAccess(cacheContext: TokenCacheContext): Promise<void>; /** * Clears credentials cache. */ clearCache(): Promise<void>; } //# sourceMappingURL=persistence-cache-plugin.d.ts.map