import { AccessTokenCacheItem } from "./AccessTokenCacheItem"; import { CacheLocation } from "../Configuration"; import { BrowserStorage } from "./BrowserStorage"; /** * @hidden */ export declare class AuthCache extends BrowserStorage { private clientId; private rollbackEnabled; constructor(clientId: string, cacheLocation: CacheLocation, storeAuthStateInCookie: boolean); /** * Support roll back to old cache schema until the next major release: true by default now * @param storeAuthStateInCookie */ private migrateCacheEntries; /** * Utility function to help with roll back keys * @param newKey * @param value * @param storeAuthStateInCookie */ private duplicateCacheEntry; /** * Prepend msal. to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema) * @param key * @param addInstanceId */ private generateCacheKey; /** * add value to storage * @param key * @param value * @param enableCookieStorage */ setItem(key: string, value: string, enableCookieStorage?: boolean, state?: string): void; /** * get one item by key from storage * @param key * @param enableCookieStorage */ getItem(key: string, enableCookieStorage?: boolean): string; /** * remove value from storage * @param key */ removeItem(key: string): void; /** * Reset the cache items */ resetCacheItems(): void; /** * Reset all temporary cache items */ resetTempCacheItems(state: string): void; /** * Set cookies for IE * @param cName * @param cValue * @param expires */ setItemCookie(cName: string, cValue: string, expires?: number): void; /** * get one item by key from cookies * @param cName */ getItemCookie(cName: string): string; /** * Get all access tokens in the cache * @param clientId * @param homeAccountIdentifier */ getAllAccessTokens(clientId: string, homeAccountIdentifier: string): Array; /** * Return if the token renewal is still in progress * @param stateValue */ private tokenRenewalInProgress; /** * Clear all cookies */ clearMsalCookie(state?: string): void; /** * Create acquireTokenAccountKey to cache account object * @param accountId * @param state */ static generateAcquireTokenAccountKey(accountId: any, state: string): string; /** * Create authorityKey to cache authority * @param state */ static generateAuthorityKey(state: string): string; }