This class implements Storage for node, reading cache from user specified storage location or an extension library

Hierarchy

  • CacheManager
    • NodeStorage

Constructors

Methods

  • Validate the cache key against filter before retrieving and parsing cache value

    Parameters

    Returns boolean

  • Returns whether or not the given credential entity matches the filter

    Parameters

    Returns boolean

  • returns cache key used for cloud instance metadata

    Parameters

    • authority: string

    Returns string

  • Retrieve AccessTokenEntity from cache

    Parameters

    Returns null | AccessTokenEntity

  • Gets all access tokens matching the filter

    Parameters

    Returns AccessTokenEntity[]

  • fetch the account entity

    Parameters

    • accountKey: string

      lookup key to fetch cache type AccountEntity

    Returns null | AccountEntity

  • Gets first tenanted AccountInfo object found based on provided filters

    Parameters

    Returns null | AccountInfo

  • Retrieve account entities matching all provided tenant-agnostic filters; if no filter is set, get all account entities in the cache Not checking for casing as keys are all generated in lower case, remember to convert to lower case if object properties are compared

    Parameters

    • accountFilter: AccountFilter

      An object containing Account properties to filter by

    Returns AccountEntity[]

  • Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.

    Parameters

    • Optional accountFilter: AccountFilter

      (Optional) filter to narrow down the accounts returned

    Returns AccountInfo[]

    Array of AccountInfo objects in cache

  • retrieve appMetadata matching all provided filters; if no filter is set, get all appMetadata

    Parameters

    • filter: AppMetadataFilter

    Returns AppMetadataCache

  • fetch authority metadata entity from the platform cache

    Parameters

    • key: string

      lookup key to fetch cache type AuthorityMetadataEntity

    Returns null | AuthorityMetadataEntity

  • retrieve authorityMetadata that contains a matching alias

    Parameters

    • host: string

    Returns null | AuthorityMetadataEntity

  • Returns a single matching

    Parameters

    Returns null | AccountInfo

  • Reads account from cache, builds it into an account entity and returns it.

    Parameters

    • accountKey: string

    Returns null | AccountEntity

  • Retrieve IdTokenEntity from cache

    Parameters

    • account: AccountInfo

      {AccountInfo}

    • Optional tokenKeys: TokenKeys

      {?TokenKeys}

    • Optional targetRealm: string

      {?string}

    • Optional performanceClient: IPerformanceClient

      {?IPerformanceClient}

    • Optional correlationId: string

      {?string}

    Returns null | IdTokenEntity

  • Gets all idTokens matching the given filter

    Parameters

    Returns Map<string, IdTokenEntity>

  • Helper to retrieve the appropriate refresh token from cache

    Parameters

    • account: AccountInfo

      {AccountInfo}

    • familyRT: boolean

      {boolean}

    • Optional tokenKeys: TokenKeys

      {?TokenKeys}

    • Optional performanceClient: IPerformanceClient

      {?IPerformanceClient}

    • Optional correlationId: string

      {?string}

    Returns null | RefreshTokenEntity

  • Validate the cache key against filter before retrieving and parsing cache value

    Parameters

    Returns boolean

  • Returns true if the given key matches our account key schema. Also matches homeAccountId and/or tenantId if provided

    Parameters

    • key: string
    • Optional homeAccountId: string
    • Optional tenantId: string

    Returns boolean

  • Return the family_id value associated with FOCI

    Parameters

    • environment: string

    Returns boolean

  • Returns true if the given key matches our credential key schema.

    Parameters

    • key: string

    Returns boolean

  • Retrieve AccountEntity from cache

    Parameters

    Returns null | AccountEntity

  • Retrieve AppMetadataEntity from cache

    Parameters

    • environment: string

    Returns null | AppMetadataEntity

  • Validate the cache key against filter before retrieving and parsing cache value

    Parameters

    Returns boolean

  • Queue up callbacks

    Parameters

    • func: (() => void)

      a callback function for cache change indication

        • (): void
        • Returns void

    Returns void

  • returns a boolean if the given credential is removed

    Parameters

    • key: string

    Returns Promise<void>

  • Removes the account and related tokens for a given account key

    Parameters

    • accountKey: string

    Returns Promise<void>

  • Removes credentials associated with the provided account

    Parameters

    • account: AccountEntity

    Returns Promise<void>

  • Removes all accounts and related tokens from cache.

    Returns Promise<void>

  • Removes all app metadata objects from cache.

    Returns boolean

  • Removes idToken from the cache

    Parameters

    • key: string

    Returns void

  • Removes the cache item from memory with the given key.

    Parameters

    • key: string

      lookup key to remove a cache entity

    Returns boolean

  • Remove account entity from the platform cache if it's outdated

    Parameters

    • accountKey: string

    Returns void

  • Removes refresh token from the cache

    Parameters

    • key: string

    Returns void

  • saves a cache record

    Parameters

    • cacheRecord: CacheRecord

      {CacheRecord}

    • Optional storeInCache: StoreInCache

      {?StoreInCache}

    • Optional correlationId: string

      {?string} correlation id

    Returns Promise<void>

  • set account entity

    Parameters

    • account: AccountEntity

      cache value to be set of type AccountEntity

    Returns void

  • set authority metadata entity to the platform cache

    Parameters

    • key: string

      lookup key to fetch cache type AuthorityMetadataEntity

    • metadata: AuthorityMetadataEntity

      cache value to be set of type AuthorityMetadataEntity

    Returns void

  • Gets cache item with given key-value

    Parameters

    • key: string

      lookup key for the cache entry

    • value: ValidCacheType

      value of the cache entry

    Returns void

  • set server telemetry entity to the platform cache

    Parameters

    • serverTelemetryKey: string

      lookup key to fetch cache type ServerTelemetryEntity

    • serverTelemetry: ServerTelemetryEntity

      cache value to be set of type ServerTelemetryEntity

    Returns void

  • set throttling entity to the platform cache

    Parameters

    • throttlingCacheKey: string

      lookup key to fetch cache type ThrottlingEntity

    • throttlingCache: ThrottlingEntity

      cache value to be set of type ThrottlingEntity

    Returns void

  • Updates a credential's cache key if the current cache key is outdated

    Parameters

    • currentCacheKey: string
    • credential: ValidCredentialType

    Returns string

  • Helper to convert serialized data to object

    Type Parameters

    • T

    Parameters

    • obj: T
    • json: object

    Returns T

Generated using TypeDoc