diff options
author | Piotr Wielebski <piotr.wielebski@nokia.com> | 2019-03-19 13:37:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-19 13:37:34 +0000 |
commit | 9b03823dc6ac4bec2e61a4e54d114a518dbb1100 (patch) | |
tree | cccb91704e68dfda8f3490b2a5956fa29d15d689 /rest-services/aai-client/src/main/java/org | |
parent | 35b114b70ab9da6c519d437dcceafc03da2a88a1 (diff) | |
parent | e797ed3347d2c6d5ee8af16c33aca45fe42eb2ce (diff) |
Merge "Remove modification of Http Headers"
Diffstat (limited to 'rest-services/aai-client/src/main/java/org')
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())); - } } |