diff options
Diffstat (limited to 'rest-services')
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())); - } } |