It matters whether Features for authentication in the Jersey client builder are registered before or after a ClientConfig is applied. If the features are registered before the ClientConfig, the ClientConfig overwrites the previously registered features.
Instead of:
ClientBuilder builder = ClientBuilder.newBuilder();
authFeatures.forEach(builder::register);
ClientConfig config = new ClientConfig();
builder.withConfig(config);
it should therefore be:
ClientBuilder builder = ClientBuilder.newBuilder();
ClientConfig config = new ClientConfig();
builder.withConfig(config);
authFeatures.forEach(builder::register);
This should be changed in the DsfClientJersey of the API v2 implementation:
|
ClientBuilder builder = ClientBuilder.newBuilder(); |
|
|
|
authFeatures.forEach(builder::register); |
|
|
|
if (sslContext != null) |
|
builder.sslContext(sslContext); |
|
|
|
ClientConfig config = new ClientConfig(); |
|
config.connectorProvider(new ApacheConnectorProvider()); |
|
config.property(ClientProperties.PROXY_URI, proxySchemeHostPort); |
|
config.property(ClientProperties.PROXY_USERNAME, proxyUserName); |
|
config.property(ClientProperties.PROXY_PASSWORD, proxyPassword == null ? null : String.valueOf(proxyPassword)); |
|
builder.withConfig(config); |
It matters whether
Featuresfor authentication in the Jersey client builder are registered before or after aClientConfigis applied. If the features are registered before theClientConfig, theClientConfigoverwrites the previously registered features.Instead of:
it should therefore be:
This should be changed in the DsfClientJersey of the API v2 implementation:
dsf/dsf-bpe/dsf-bpe-process-api-v2-impl/src/main/java/dev/dsf/bpe/v2/client/dsf/DsfClientJersey.java
Lines 224 to 236 in 593b947