summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2018-05-23 20:13:07 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-23 20:13:07 +0000
commit95207ef6f7006afca1b23d9ad72ccf2daa7e250e (patch)
tree23d0dc68e0233f859b73eabda25c145c3c28797b /src/main/java
parent1d66da9bb8570a34812a766dd1efa71a022e3f70 (diff)
parentbb871a31b2a46acda5169620c3ca6f28a3c2ecd1 (diff)
Merge "SSL_BASIC getting 403 error"
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/aai/restclient/client/RestClient.java4
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 cfeeb27..a00c0ef 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());
}