Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,13 @@ String retrieveAccessToken()
onBehalfOf,
identity.getId());

final OAuth2TokenResponse tokenResponse = ResilienceDecorator.executeSupplier(() -> {
switch( onBehalfOf ) {
case TECHNICAL_USER_PROVIDER:
return executeClientCredentialsFlow(null);
case TECHNICAL_USER_CURRENT_TENANT:
final Tenant tenant = TenantAccessor.tryGetCurrentTenant().getOrNull();
return executeClientCredentialsFlow(tenant);
case NAMED_USER_CURRENT_TENANT:
return executeUserExchangeFlow();
default:
throw new IllegalStateException("Unknown behalf " + onBehalfOf);
}
final OAuth2TokenResponse tokenResponse = ResilienceDecorator.executeSupplier(() -> switch (onBehalfOf) {
case TECHNICAL_USER_PROVIDER -> executeClientCredentialsFlow(null);
case TECHNICAL_USER_CURRENT_TENANT -> {
final Tenant tenant = TenantAccessor.tryGetCurrentTenant().getOrNull();
yield executeClientCredentialsFlow(tenant);
}
case NAMED_USER_CURRENT_TENANT -> executeUserExchangeFlow();
}, resilienceConfiguration);

if( tokenResponse == null ) {
Expand Down Expand Up @@ -231,6 +226,7 @@ private void setAppTidInCaseOfIAS( @Nullable final String tenantId )
if( onBehalfOf == OnBehalfOf.NAMED_USER_CURRENT_TENANT ) {
// workaround until a fix is provided by IAS
additionalParameters.put("refresh_expiry", "0");
additionalParameters.put("token_format", "jwt");
}
}
}
Expand Down Expand Up @@ -475,6 +471,6 @@ OAuth2Service build()
enum TenantPropagationStrategy
{
TENANT_SUBDOMAIN,
ZID_HEADER;
ZID_HEADER
}
}
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- [Connectivity Destination Service] Migrated to Apache Httpclient 5.
- The replacement for `HttpClientAccessor` is `ApacheHttpClient5Accessor`
- [OAuth2] Set `token_format=jwt` for `NAMED_USER_CURRENT_TENANT` IAS token exchange.

### ✨ New Functionality

Expand Down