Issue-ID: AAI-1097
Change-Id: I19e57b5414f84abcb177d632ac568a88229ccb92
Signed-off-by: Ashoka M G <ashok.g@arris.com>
builder.header(header.getKey(), String.join(";",header.getValue()));
}
builder.header(header.getKey(), String.join(";",header.getValue()));
}
- if (clientBuilder.getAuthenticationMode() == RestAuthenticationMode.SSL_BASIC) {
+ //Added additional check to prevent adding duplicate authorization header if client is already sending the authorization header
+ // AAI-1097 - For AAI calls when Rest authentication mode is selected as SSL_BASIC getting 403 error
+ if (clientBuilder.getAuthenticationMode() == RestAuthenticationMode.SSL_BASIC && headers.get(Headers.AUTHORIZATION) == null) {
builder = builder.header(Headers.AUTHORIZATION,
clientBuilder.getBasicAuthenticationCredentials());
}
builder = builder.header(Headers.AUTHORIZATION,
clientBuilder.getBasicAuthenticationCredentials());
}