@sap-cloud-sdk/connectivity
Version:
SAP Cloud SDK for JavaScript connectivity
19 lines (18 loc) • 744 B
TypeScript
import { Cache } from './cache';
import type { ClientCredentialsResponse } from './xsuaa-service-types';
/** *
* @internal
* @param tenantId - The ID of the tenant to cache the token for.
* @param clientId - ClientId to fetch the token
* @returns the token
*/
export declare function getCacheKey(tenantId: string | undefined, clientId: string): string | undefined;
/**
* @internal
*/
export declare const clientCredentialsTokenCache: {
getToken: (tenantId: string | undefined, clientId: string) => ClientCredentialsResponse | undefined;
cacheToken: (tenantId: string | undefined, clientId: string, token: ClientCredentialsResponse) => void;
clear: () => void;
getCacheInstance: () => Cache<ClientCredentialsResponse>;
};