From 3fe5b14a521512a4193f21f8bf862bbd27bd23ec Mon Sep 17 00:00:00 2001 From: Matthias Kuhr <52661546+MatKuhr@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:53:08 +0200 Subject: [PATCH] Add docs on OAuth2 token timeout (#1892) --- .../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