diff --git a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/pubsub/EventGridHandshakeHandler.java b/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/pubsub/EventGridHandshakeHandler.java deleted file mode 100644 index 686636d81d51e00bc69895f8a105063a7423bdbe..0000000000000000000000000000000000000000 --- a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/pubsub/EventGridHandshakeHandler.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package org.opengroup.osdu.notification.provider.azure.pubsub; - -import com.google.gson.JsonObject; -import org.opengroup.osdu.core.common.model.http.AppException; -import org.opengroup.osdu.notification.provider.interfaces.IPubsubHandshakeHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.stereotype.Component; - -@Component -public class EventGridHandshakeHandler implements IPubsubHandshakeHandler { - - @Autowired - private EventGridRequestBodyExtractor eventGridRequestBodyExtractor; - - /** - * Extract Handshake response string form Handshake request. - * TODO: Check if there is a need to verify subscription name with - * registration service, before verifying the endpoint. - * @return validation string - */ - @Override - public String getHandshakeResponse() { - String response; - - try { - String validationCode = this.eventGridRequestBodyExtractor.getValidationCodeForHandshake(); - JsonObject jsonResponse = new JsonObject(); - jsonResponse.addProperty("ValidationResponse", validationCode); - - response = jsonResponse.toString(); - } catch (Exception exception) { - throw new AppException(HttpStatus.BAD_REQUEST.value(), "Request payload parsing error", - "Unable to parse request payload.", exception); - } - - return response; - } -} \ No newline at end of file