Declaration of a destination to be retrieved from an environment variable or from the destination service on SAP Business Technology Platform, including all DestinationOptions.

Use an object of this interface to specify which destination shall be used when executing a request. The destination will be retrieved via its destinationName according to the following algorithm:

  1. If a destination of this destinationName is defined in the environment variable destinations (if available), it will be converted into a Destination and used for the request.
  2. Otherwise, the destination service on SAP Business Technology Platform is queried for a destination with the given destinationName, using the access token provided as value of property jwt. Additionally, you can set DestinationOptions for objects of this interface. For more information check out our documentation: https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destination.

Hierarchy

Properties

cacheVerificationKeys?: boolean

The verification keys are cached if set to true.

destinationName: string

Name of the destination to retrieve, mandatory.

enableCircuitBreaker?: boolean

A boolean value that indicates whether to execute request to SCP-CF services using circuit breaker. ResilienceOptions.

Deprecated

Since v2.13.0. Option will be removed in version 3.0 of the SDK. Circuit breaker is enabled per default and it can not be disabled anymore.

iasToXsuaaTokenExchange?: boolean

Option to enable/disable the IAS token to XSUAA token exchange.

isolationStrategy?: IsolationStrategy

The isolation strategy used for caching destinations. For the available options, see IsolationStrategy. By default, IsolationStrategy.Tenant_User is set.

iss?: string

This property is only considered in case no userJwt is provided. It is meant for situations where you do not have a token e.g. background processes. The value for iss is the issuer field of a JWT e.g. https://.localhost:8080/uaa/oauth/token'.

ATTENTION: If this property is used, no validation of the provided subdomain value is done. This is differs from how the userJwt is handled. So be careful that the used value is not manipulated and breaks the tenant isolation of your application.

jwt?: string

The user token of the current request.

selectionStrategy?: DestinationSelectionStrategy

Method that implements the selection strategy of the retrieved destination. Uses subscriberFirst per default. Use the selector helper DestinationSelectionStrategies to select the appropriate selection strategy.

timeout?: number

Timeout in milliseconds to retrieve the destination.

Deprecated

Since v2.13.0. Option will be removed in version 3.0 of the SDK. Timeout is enabled per default with a value of 10 seconds.

useCache?: boolean

A boolean value that indicates whether to read destinations from cache.

Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.