From 9a22c7cef1c6dabf7eca914ba18df3a4815be31c Mon Sep 17 00:00:00 2001 From: Kuhr Date: Mon, 19 Aug 2024 14:30:56 +0200 Subject: [PATCH] Add docs on OAuth2 token timeout --- .../features/connectivity/003-service-bindings.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs-java/features/connectivity/003-service-bindings.mdx b/docs-java/features/connectivity/003-service-bindings.mdx index 0141020317..80b38a0c27 100644 --- a/docs-java/features/connectivity/003-service-bindings.mdx +++ b/docs-java/features/connectivity/003-service-bindings.mdx @@ -454,6 +454,18 @@ If not explicitly specified, `OnBehalfOf.TECHNICAL_USER_CURRENT_TENANT` is used. Adding custom parameters to the `ServiceBindingDestinationOptions` can be done using the [`withOption(OptionsEnhancer)`]() method. Hereby, an [`OptionsEnhancer`](pathname:///java-api/v5/com/sap/cloud/sdk/cloudplatform/connectivity/ServiceBindingDestinationOptions.OptionsEnhancer.html) is a type-safe representation of arbitrary parameters. +For OAuth2 based service bindings, the `OAuth2Options.TokenRetrievalTimeout` can be used to customize the timeout for token requests. +The below example sets a timeout of 100 seconds: + +```java +ServiceBindingDestinationOptions + .forService(ServiceIdentifier.of("my-service")) + .withOption( + OAuth2Options.TokenRetrievalTimeout.of( + TimeLimiterConfiguration.of(Duration.ofSeconds(100)))) + .build(); +``` +
Example: Custom Service Binding Transformation