diff options
author | Ashoka M G <ashok.g@arris.com> | 2018-05-04 15:16:12 +0530 |
---|---|---|
committer | Ashoka M G <ashok.g@arris.com> | 2018-05-04 15:18:58 +0530 |
commit | bb871a31b2a46acda5169620c3ca6f28a3c2ecd1 (patch) | |
tree | 471a1b3361df4eb7f9d7bacc15756296d61df8eb /src | |
parent | 07fee440187553d183bf36ef2b523aa38ab14f3e (diff) |
SSL_BASIC getting 403 error
Issue-ID: AAI-1097
Change-Id: I19e57b5414f84abcb177d632ac568a88229ccb92
Signed-off-by: Ashoka M G <ashok.g@arris.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/aai/restclient/client/RestClient.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/onap/aai/restclient/client/RestClient.java b/src/main/java/org/onap/aai/restclient/client/RestClient.java index 64b52fb..aab33a0 100644 --- a/src/main/java/org/onap/aai/restclient/client/RestClient.java +++ b/src/main/java/org/onap/aai/restclient/client/RestClient.java @@ -611,7 +611,9 @@ public class RestClient { 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()); } |