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

  • Checks whether key is in cache.

    Parameters

    • key: string

      look up key for a cache entity

    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

  • 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 accountInfo object based on provided filters

    Parameters

    • accountFilter: AccountFilter

    Returns null | AccountInfo

  • retrieve accounts matching all provided filters; if no filter is set, get all accounts 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

    Returns AccountEntity[]

  • Returns all accounts in cache

    Returns AccountInfo[]

  • 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

  • Retrieve IdTokenEntity from cache

    Parameters

    Returns null | IdTokenEntity

  • Gets all idTokens matching the given filter

    Parameters

    Returns IdTokenEntity[]

  • Helper to retrieve the appropriate refresh token from cache

    Parameters

    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

  • Retrieve the cached credentials into a cacherecord

    Parameters

    Returns CacheRecord

  • 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

  • Removes refresh token from the cache

    Parameters

    • key: string

    Returns void

  • saves a cache record

    Parameters

    • cacheRecord: CacheRecord
    • Optional storeInCache: StoreInCache

    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