@sap-cloud-sdk/connectivity
Version:
SAP Cloud SDK for JavaScript connectivity
18 lines (17 loc) • 1.05 kB
TypeScript
import { IdentityService } from '@sap/xssec';
import type { IdentityServiceCredentials } from './environment-accessor-types';
import type { JwtPayload } from '../jsonwebtoken-type';
/**
* @internal
* A cache for `IdentityService` instances.
* Direct access from outside this module outside tests is discouraged.
*/
export declare const identityServicesCache: Map<string, IdentityService>;
/**
* @internal
* @param credentials - Identity service credentials extracted from a service binding or re-use service. Required to create the xssec `IdentityService` instance.
* @param jwt - Optional JWT string or payload to extract the issuer URL for bearer assertion flows.
* @param disableCache - Value to enable or disable JWKS cache in the xssec library. Defaults to false.
* @returns An instance of {@link @sap/xssec/IdentityService} for the provided credentials.
*/
export declare function getIdentityServiceInstanceFromCredentials(credentials: IdentityServiceCredentials, jwt?: string | JwtPayload, disableCache?: boolean): IdentityService;