aboutsummaryrefslogtreecommitdiffstats
path: root/rest-services
diff options
context:
space:
mode:
authorMarcin Migdal <marcin.migdal@nokia.com>2019-03-19 14:29:18 +0100
committerMarcin Migdal <marcin.migdal@nokia.com>2019-03-19 14:29:26 +0100
commite797ed3347d2c6d5ee8af16c33aca45fe42eb2ce (patch)
tree428c971189f98682b0030fd4691c9e4ed332d0db /rest-services
parent7abe2954d3783cb8a6484f012507be95d59c82b9 (diff)
Remove modification of Http Headers
Change-Id: I62c6750995e8b88bbd65018e4532192cfc678d6b Issue-ID: DCAEGEN2-1310 Signed-off-by: Marcin Migdal <marcin.migdal@nokia.com>
Diffstat (limited to 'rest-services')
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiHttpClientFactory.java4
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java7
-rw-r--r--rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java7
3 files changed, 0 insertions, 18 deletions
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiHttpClientFactory.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiHttpClientFactory.java
index 5e117456..d2e109ee 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiHttpClientFactory.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiHttpClientFactory.java
@@ -73,10 +73,6 @@ public class AaiHttpClientFactory {
return Try.of(() -> Paths.get(Passwords.class.getResource(resource).toURI()));
}
- public static String performBasicAuthentication(String userName, String password) {
- return Base64.getEncoder().encodeToString((userName + ":" + password).getBytes());
- }
-
public static RequestDiagnosticContext createRequestDiagnosticContext() {
return ImmutableRequestDiagnosticContext.builder()
.invocationId(UUID.randomUUID()).requestId(UUID.randomUUID()).build();
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
index 07987d2e..4ff500a3 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/get/AaiHttpGetClient.java
@@ -28,8 +28,6 @@ import org.onap.dcaegen2.services.sdk.rest.services.uri.URI;
import reactor.core.publisher.Mono;
import static org.onap.dcaegen2.services.sdk.rest.services.aai.client.service.AaiHttpClientFactory.createRequestDiagnosticContext;
-import static org.onap.dcaegen2.services.sdk.rest.services.aai.client.service.AaiHttpClientFactory.performBasicAuthentication;
-
public final class AaiHttpGetClient implements AaiHttpClient<String> {
@@ -39,7 +37,6 @@ public final class AaiHttpGetClient implements AaiHttpClient<String> {
public AaiHttpGetClient(AaiClientConfiguration configuration) {
this.configuration = configuration;
- addAuthorizationBasicHeader();
}
@Override
@@ -60,8 +57,4 @@ public final class AaiHttpGetClient implements AaiHttpClient<String> {
.path(configuration.aaiBasePath() + configuration.aaiPnfPath() + "/" + pnfName).build().toString();
}
- private void addAuthorizationBasicHeader() {
- configuration.aaiHeaders().put("Authorization",
- "Basic " + performBasicAuthentication(configuration.aaiUserName(), configuration.aaiUserPassword()));
- }
}
diff --git a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
index ef601550..20592194 100644
--- a/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
+++ b/rest-services/aai-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/http/patch/AaiHttpPatchClient.java
@@ -30,8 +30,6 @@ import reactor.core.publisher.Mono;
import reactor.netty.http.client.HttpClientResponse;
import static org.onap.dcaegen2.services.sdk.rest.services.aai.client.service.AaiHttpClientFactory.createRequestDiagnosticContext;
-import static org.onap.dcaegen2.services.sdk.rest.services.aai.client.service.AaiHttpClientFactory.performBasicAuthentication;
-
public final class AaiHttpPatchClient implements AaiHttpClient<HttpClientResponse> {
@@ -43,7 +41,6 @@ public final class AaiHttpPatchClient implements AaiHttpClient<HttpClientRespons
public AaiHttpPatchClient(final AaiClientConfiguration configuration, JsonBodyBuilder jsonBodyBuilder) {
this.configuration = configuration;
this.jsonBodyBuilder = jsonBodyBuilder;
- addAuthorizationBasicHeader();
}
public Mono<HttpClientResponse> getAaiResponse(AaiModel aaiModel) {
@@ -64,8 +61,4 @@ public final class AaiHttpPatchClient implements AaiHttpClient<HttpClientRespons
.path(configuration.aaiBasePath() + configuration.aaiPnfPath() + "/" + pnfName).build().toString();
}
- private void addAuthorizationBasicHeader() {
- configuration.aaiHeaders().put("Authorization",
- "Basic " + performBasicAuthentication(configuration.aaiUserName(), configuration.aaiUserPassword()));
- }
}