Skip to content

Commit 246a05e

Browse files
feat: [OAuth2] Set token_format=jwt for NAMED_USER_CURRENT_TENANT IAS token exchange
1 parent 8a3ec7e commit 246a05e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity

cloudplatform/connectivity-oauth/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/OAuth2Service.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ String retrieveAccessToken()
162162
}
163163
}, resilienceConfiguration);
164164

165-
if( tokenResponse == null ) {
165+
if( tokenResponse == null ) {
166166
final String message = "OAuth2 token request failed";
167167
log.debug(message);
168168
throw new DestinationOAuthTokenException(null, message);
@@ -231,6 +231,7 @@ private void setAppTidInCaseOfIAS( @Nullable final String tenantId )
231231
if( onBehalfOf == OnBehalfOf.NAMED_USER_CURRENT_TENANT ) {
232232
// workaround until a fix is provided by IAS
233233
additionalParameters.put("refresh_expiry", "0");
234+
additionalParameters.put("token_format", "jwt");
234235
}
235236
}
236237
}
@@ -475,6 +476,6 @@ OAuth2Service build()
475476
enum TenantPropagationStrategy
476477
{
477478
TENANT_SUBDOMAIN,
478-
ZID_HEADER;
479+
ZID_HEADER
479480
}
480481
}

0 commit comments

Comments
 (0)