diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java index 975d66958a16e46da89103d1441d97219be42fe1..89a3376a13fccbd420fbdd17a75189cbc9f6776e 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/api/PubsubEndpoint.java @@ -36,7 +36,7 @@ import org.opengroup.osdu.core.common.notification.SubscriptionException; import org.opengroup.osdu.notification.di.SubscriptionCacheFactory; import org.opengroup.osdu.notification.pubsub.PubsubRequestBodyExtractor; import org.opengroup.osdu.notification.utils.Config; -import org.opengroup.osdu.notification.utils.IGoogleServiceAccount; +import org.opengroup.osdu.notification.provider.interfaces.IGoogleServiceAccount; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/AuthorizationFilter.java b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/AuthorizationFilter.java index c720b2d5c9f10d34d48f91b9abb68f9eef38c421..e646b877925fa3446960b6b1813292301ba6af9e 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/AuthorizationFilter.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/AuthorizationFilter.java @@ -23,7 +23,7 @@ import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.provider.interfaces.IAuthorizationService; import org.opengroup.osdu.notification.di.RequestInfoExt; import org.opengroup.osdu.notification.utils.Config; -import org.opengroup.osdu.notification.utils.ServiceAccountValidator; +import org.opengroup.osdu.notification.provider.interfaces.ServiceAccountValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.context.annotation.RequestScope; diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/EntitlementsClientFactory.java b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/EntitlementsClientFactory.java index efd7a908ed9e536d9e9ece3fe4e22dae127b4d33..53a5427d160a4abb8949c8cfbd55274ea19c5eb0 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/auth/EntitlementsClientFactory.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/auth/EntitlementsClientFactory.java @@ -19,7 +19,7 @@ package org.opengroup.osdu.notification.auth; import org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig; import org.opengroup.osdu.core.common.entitlements.EntitlementsFactory; import org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory; -import org.opengroup.osdu.notification.utils.IAppProperties; +import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.AbstractFactoryBean; import org.springframework.stereotype.Component; diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java b/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java index f27e7815c3f1a3b575e70a070a18a017ea7f9b02..24b6646c8b93cb795ba8fedb04e9ade785d65788 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/di/CredentialHeadersProvider.java @@ -18,7 +18,6 @@ package org.opengroup.osdu.notification.di; import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.util.IServiceAccountJwtClient; import org.opengroup.osdu.notification.pubsub.PubsubRequestBodyExtractor; -import org.opengroup.osdu.notification.utils.IAppProperties; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/di/SubscriptionClientFactory.java b/notification-core/src/main/java/org/opengroup/osdu/notification/di/SubscriptionClientFactory.java index b367f7fc1eec6639e0766b44922a5e88e488f5a4..feda29e96750cec68e9d1c9bb33db65e9767233a 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/di/SubscriptionClientFactory.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/di/SubscriptionClientFactory.java @@ -16,17 +16,13 @@ package org.opengroup.osdu.notification.di; +import org.opengroup.osdu.core.common.notification.ISubscriptionFactory; import org.opengroup.osdu.core.common.notification.SubscriptionAPIConfig; import org.opengroup.osdu.core.common.notification.SubscriptionFactory; -import org.opengroup.osdu.notification.utils.IAppProperties; +import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.AbstractFactoryBean; -import org.springframework.beans.factory.config.ConfigurableBeanFactory; -import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import org.opengroup.osdu.core.common.notification.ISubscriptionFactory; -import org.opengroup.osdu.core.common.model.notification.*; @Component public class SubscriptionClientFactory extends AbstractFactoryBean<ISubscriptionFactory> { diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IAppProperties.java b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IAppProperties.java index 855d35126996b92a637b3d2c525916de3a5e3c29..188ca8c280e0f3a8e0d7a03a63af345f66c776f5 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IAppProperties.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IAppProperties.java @@ -1,4 +1,4 @@ -package org.opengroup.osdu.notification.utils; +package org.opengroup.osdu.notification.provider.interfaces; public interface IAppProperties { diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IGoogleServiceAccount.java b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IGoogleServiceAccount.java index ae067a8a9fdf7c4aa3306945161349a21f734e85..33628ba3df8ab160b647a5cd69dbe5d0ef477d38 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IGoogleServiceAccount.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/IGoogleServiceAccount.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.opengroup.osdu.notification.utils; +package org.opengroup.osdu.notification.provider.interfaces; public interface IGoogleServiceAccount { diff --git a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ServiceAccountValidator.java b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ServiceAccountValidator.java index f733ea7245e4ed31aadf1c9810a24dd749de49ce..fc3648987a9d24906cd02534f475886ad1eb3973 100644 --- a/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ServiceAccountValidator.java +++ b/notification-core/src/main/java/org/opengroup/osdu/notification/provider/interfaces/ServiceAccountValidator.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package org.opengroup.osdu.notification.utils; +package org.opengroup.osdu.notification.provider.interfaces; public interface ServiceAccountValidator { - + boolean isValidPublisherServiceAccount(String jwt); boolean isValidServiceAccount(String jwt, String userIdentity, String... audiences); diff --git a/notification-core/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointTests.java b/notification-core/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointTests.java index 67b9a4a813675698e8e57f07651102c762505dc1..d3155489b3a8e6948fdb4e45e1dc43c90c2d6ab0 100644 --- a/notification-core/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointTests.java +++ b/notification-core/src/test/java/org/opengroup/osdu/notification/api/PubsubEndpointTests.java @@ -37,7 +37,7 @@ import org.opengroup.osdu.core.common.notification.SubscriptionService; import org.opengroup.osdu.notification.di.CredentialHeadersProvider; import org.opengroup.osdu.notification.di.SubscriptionCacheFactory; import org.opengroup.osdu.notification.pubsub.PubsubRequestBodyExtractor; -import org.opengroup.osdu.notification.utils.IGoogleServiceAccount; +import org.opengroup.osdu.notification.provider.interfaces.IGoogleServiceAccount; import org.powermock.modules.junit4.PowerMockRunner; import org.springframework.http.ResponseEntity; diff --git a/notification-core/src/test/java/org/opengroup/osdu/notification/auth/AuthorizationFilterTest.java b/notification-core/src/test/java/org/opengroup/osdu/notification/auth/AuthorizationFilterTest.java index c73e87d111a18a0e8077604389a2c8e396eb9c8b..6becc37ed665b16636973366adedec598f50123a 100644 --- a/notification-core/src/test/java/org/opengroup/osdu/notification/auth/AuthorizationFilterTest.java +++ b/notification-core/src/test/java/org/opengroup/osdu/notification/auth/AuthorizationFilterTest.java @@ -28,7 +28,7 @@ import org.opengroup.osdu.core.common.provider.interfaces.IAuthorizationService; import org.opengroup.osdu.notification.di.RequestInfoExt; import org.opengroup.osdu.notification.pubsub.PubsubRequestBodyExtractor; import org.opengroup.osdu.notification.utils.Config; -import org.opengroup.osdu.notification.utils.ServiceAccountValidator; +import org.opengroup.osdu.notification.provider.interfaces.ServiceAccountValidator; import org.powermock.modules.junit4.PowerMockRunner; import java.util.HashMap; diff --git a/notification-core/src/test/java/org/opengroup/osdu/notification/di/RequestInfoTest.java b/notification-core/src/test/java/org/opengroup/osdu/notification/di/RequestInfoTest.java index 2518ce8e1adc8a6d9551b48cdff5462508b50122..a0a7d4814d7c96e1bbe137188c7b28225fc8cd76 100644 --- a/notification-core/src/test/java/org/opengroup/osdu/notification/di/RequestInfoTest.java +++ b/notification-core/src/test/java/org/opengroup/osdu/notification/di/RequestInfoTest.java @@ -20,7 +20,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.opengroup.osdu.notification.utils.IAppProperties; +import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; import org.powermock.modules.junit4.PowerMockRunner; import javax.servlet.http.HttpServletRequest; diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/AppProperties.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/AppProperties.java index 19789adf6ba239bb6a6acc0f532b2a69c6459e09..1aa85c59dc6133074d6e2c55e025c558f8f238f1 100644 --- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/AppProperties.java +++ b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/AppProperties.java @@ -16,7 +16,7 @@ package org.opengroup.osdu.notification.provider.gcp.util; -import org.opengroup.osdu.notification.utils.IAppProperties; +import org.opengroup.osdu.notification.provider.interfaces.IAppProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountImpl.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountImpl.java index 7dcf3ba6627812a71e7c27de7530d78f83125c6f..1555ab181b10abe173a290752a13ed0628f7409d 100644 --- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountImpl.java +++ b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountImpl.java @@ -19,7 +19,7 @@ package org.opengroup.osdu.notification.provider.gcp.util; import lombok.SneakyThrows; import org.apache.http.impl.client.CloseableHttpClient; import org.opengroup.osdu.core.gcp.GoogleIdToken.IGoogleIdTokenFactory; -import org.opengroup.osdu.notification.utils.IGoogleServiceAccount; +import org.opengroup.osdu.notification.provider.interfaces.IGoogleServiceAccount; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountValidatorImpl.java b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountValidatorImpl.java index 2d70b3d3c601a05a508dc9f7524ac9b4ac76b976..eaac68d6c2c9d16712d3ad05ca20ed0370e3a5de 100644 --- a/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountValidatorImpl.java +++ b/provider/notification-gcp/src/main/java/org/opengroup/osdu/notification/provider/gcp/util/GoogleServiceAccountValidatorImpl.java @@ -21,7 +21,7 @@ import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; -import org.opengroup.osdu.notification.utils.ServiceAccountValidator; +import org.opengroup.osdu.notification.provider.interfaces.ServiceAccountValidator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;