You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-js/features/connectivity/destination.mdx
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -200,6 +200,42 @@ The SAP Cloud SDK provides a default implementation for the transformation of se
200
200
201
201
The default implementation also retrieves a service token, if needed.
202
202
203
+
Additionally, we provide a function to transform service bindings into OAuth2ClientCredentials destinations, assuming the service binding follows the structure outlined below:
204
+
205
+
```json
206
+
{
207
+
"VCAP_SERVICES": {
208
+
"custom-service": [
209
+
{
210
+
"name": "my-custom-service",
211
+
"label": "custom-service",
212
+
"tags": ["custom-service"],
213
+
"url": "https://example.com",
214
+
"credentials": {
215
+
"clientid": "CLIENT_ID",
216
+
"clientsecret": "CLIENT_SECRET"
217
+
}
218
+
}
219
+
]
220
+
}
221
+
}
222
+
```
223
+
224
+
If the service URL is not specified in the `url` property, it can alternatively be provided as part of the `options` parameter.
225
+
226
+
The following is a multi-tenant example, where the user's JWT is used for tenant-isolation in the cache together with a custom URL as target.
For other types of service bindings or if you want to overwrite the default behavior, provide a callback function (`serviceBindingTransformFn()`) in the request execution.
204
240
205
241
For example, if you have a binding for a custom service:
@@ -210,8 +246,8 @@ For example, if you have a binding for a custom service:
210
246
"custom-service": [
211
247
// This object is passed to `serviceBindingTransformFn()`
0 commit comments