Frodo Library - v4.8.5
    Preparing search index...

    Type Alias TokenCache

    type TokenCache = {
        deleteHost(host: string, realm?: string): boolean;
        flush(): boolean;
        getTokenCachePath(): string;
        hasSaBearerToken(): Promise<boolean>;
        hasToken(tokenType: tokenType): Promise<boolean>;
        hasUserBearerToken(): Promise<boolean>;
        hasUserSessionToken(): Promise<boolean>;
        initTokenCache(): void;
        list(): CachedSessionSummary[];
        purge(): TokenCacheInterface;
        readSaBearerToken(): Promise<AccessTokenMetaType>;
        readToken(
            tokenType: tokenType,
        ): Promise<AccessTokenMetaType | UserSessionMetaType>;
        readUserBearerToken(): Promise<AccessTokenMetaType>;
        readUserSessionToken(): Promise<UserSessionMetaType>;
        saveSaBearerToken(
            token: AccessTokenMetaType,
            subject?: string,
        ): Promise<boolean>;
        saveToken(
            tokenType: tokenType,
            token: AccessTokenMetaType | UserSessionMetaType,
            subject?: string,
        ): Promise<boolean>;
        saveUserBearerToken(
            token: AccessTokenMetaType,
            subject?: string,
        ): Promise<boolean>;
        saveUserSessionToken(
            token: UserSessionMetaType,
            subject?: string,
        ): Promise<boolean>;
    }
    Index

    Methods

    • Delete all cached tokens for a host, or just one realm under it

      Parameters

      • host: string

        host to delete cached tokens for

      • Optionalrealm: string

        optional realm to scope the deletion to

      Returns boolean

      true if a matching entry was found and removed, false otherwise

    • Flush cache

      Returns boolean

      true if the operation succeeded, false otherwise

    • Get connection profiles file name

      Returns string

      connection profiles file name

    • Check if there are suitable service account bearer tokens in the cache

      Returns Promise<boolean>

      true if tokens found in cache, false otherwise

    • Check if there are suitable tokens in the cache

      Parameters

      Returns Promise<boolean>

      true if tokens found in cache, false otherwise

    • Check if there are suitable user bearer tokens in the cache

      Returns Promise<boolean>

      true if tokens found in cache, false otherwise

    • Check if there are suitable user session tokens in the cache

      Returns Promise<boolean>

      true if tokens found in cache, false otherwise

    • Initialize token cache

      This method is called from app.ts and runs before any of the message handlers are registered. Therefore none of the Console message functions will produce any output.

      Returns void

    • Save service account bearer token for current connection

      Parameters

      • token: AccessTokenMetaType
      • Optionalsubject: string

        optional real service-account name, recorded for display by list()

      Returns Promise<boolean>

      true if the operation succeeded, false otherwise

    • Save user bearer token for current connection

      Parameters

      • token: AccessTokenMetaType
      • Optionalsubject: string

        optional real username, recorded for display by list()

      Returns Promise<boolean>

      true if the operation succeeded, false otherwise

    • Save user session token for current connection

      Parameters

      • token: UserSessionMetaType
      • Optionalsubject: string

        optional real username, recorded for display by list()

      Returns Promise<boolean>

      true if the operation succeeded, false otherwise