@sap-cloud-sdk/connectivity
Version:
SAP Cloud SDK for JavaScript connectivity
14 lines (13 loc) • 654 B
TypeScript
import type { JwtPayload } from '../jsonwebtoken-type';
/**
* This method either decodes the given JWT or tries to retrieve the tenant from a service binding (XSUAA, IAS or destination) as `zid`.
* @param options - Options passed to register the destination containing the JWT.
* @returns The decoded JWT or a dummy JWT containing the tenant identifier (zid).
* @internal
*/
export declare function decodeOrMakeJwt(jwt?: string | JwtPayload): JwtPayload | undefined;
/**
* @internal
* @returns The tenant identifier from the XSUAA, identity or destination service binding.
*/
export declare function getTenantIdFromBinding(): string | undefined;