Skip to content

Commit

Permalink
Add docs on OAuth2 token timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
MatKuhr committed Aug 19, 2024
1 parent 1948304 commit 9a22c7c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs-java/features/connectivity/003-service-bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)`](<pathname:///java-api/v5/com/sap/cloud/sdk/cloudplatform/connectivity/ServiceBindingDestinationOptions.Builder.html#withOption(com.sap.cloud.sdk.cloudplatform.connectivity.ServiceBindingDestinationOptions.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();
```

<details>
<summary>Example: Custom Service Binding Transformation</summary>

Expand Down

0 comments on commit 9a22c7c

Please sign in to comment.