feat: Migrate to HttpClient5 in OAuth2Service#1103
Open
Conversation
Jonas-Isr
commented
Feb 26, 2026
Comment on lines
+87
to
+89
| @Test | ||
| @DisplayName( "createHttpClient with non-certificate-based ClientIdentity should return default HTTP client" ) | ||
| void testCreateHttpClientWithNonCertificateBasedClientIdentity() |
Member
Author
There was a problem hiding this comment.
We could maybe remove some if these first tests of createHttpClient. But technically they all test different behaviours.
...rc/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/HttpClient5OAuth2TokenService.java
Fixed
Show fixed
Hide fixed
...rc/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/HttpClient5OAuth2TokenService.java
Fixed
Show fixed
Hide fixed
...rc/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/HttpClient5OAuth2TokenService.java
Fixed
Show fixed
Hide fixed
...rc/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/HttpClient5OAuth2TokenService.java
Fixed
Show fixed
Hide fixed
...rc/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/HttpClient5OAuth2TokenService.java
Fixed
Show fixed
Hide fixed
newtork
reviewed
Mar 2, 2026
.../com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2ServiceBindingDestinationLoaderTest.java
Outdated
Show resolved
Hide resolved
Contributor
CharlesDuboisSAP
left a comment
There was a problem hiding this comment.
Why not put your new HttpClient5OAuth2TokenService in the security library? They might have more tests to make sure it works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
https://github.com/SAP/ai-sdk-java-backlog/issues/328
This PR migrates the
OAuth2Serviceto use HttpClient5 internally. In order to do this, the new classHttpClient5OAuth2TokenServiceis introduced (and tested) in place of the previously usedcom.sap.cloud.security.xsuaa.client.DefaultOAuth2TokenServicewhich relies on HttpClient4.Feature scope:
HttpClient5OAuth2TokenServiceHttpClient5OAuth2TokenServiceHttpClient5OAuth2TokenServiceDefinition of Done
Documentation updatedRelease notes updated