diff --git a/delta/plugins/composite-views/src/main/resources/composite-views.conf b/delta/plugins/composite-views/src/main/resources/composite-views.conf index efd83f4928..f4971bd402 100644 --- a/delta/plugins/composite-views/src/main/resources/composite-views.conf +++ b/delta/plugins/composite-views/src/main/resources/composite-views.conf @@ -35,6 +35,10 @@ plugins.composite-views { # the maximum batching duration. In this window, duplicated persistence ids are discarded max-time-window = 500 millis } + # the credentials for comminication with the remote source + remote-source-credentials { + type: "anonymous" + } # the minimum allowed value for periodic rebuild strategy min-interval-rebuild = 30 minutes # the interval at which a view will look for requested restarts diff --git a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala index 0155a441be..2403661675 100644 --- a/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala +++ b/delta/plugins/composite-views/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/compositeviews/client/DeltaClientSpec.scala @@ -142,7 +142,7 @@ class DeltaClientSpec implicit private val httpCfg: HttpClientConfig = httpClientConfig private val deltaClient = - DeltaClient(HttpClient(), AuthTokenProvider.anonymousForTest, Credentials.Anonymous, 1.second) + DeltaClient(HttpClient(), AuthTokenProvider.fixedForTest(token), Credentials.Anonymous, 1.second) private val source = RemoteProjectSource( iri"http://example.com/remote-project-source", diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/AuthTokenProvider.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/AuthTokenProvider.scala index 5d2dbd5e67..a506856e96 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/AuthTokenProvider.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/auth/AuthTokenProvider.scala @@ -24,6 +24,9 @@ object AuthTokenProvider { KeyValueStore[ClientCredentials, ParsedToken]().map(cache => new CachingOpenIdAuthTokenProvider(authService, cache)) } def anonymousForTest: AuthTokenProvider = new AnonymousAuthTokenProvider + def fixedForTest(token: String): AuthTokenProvider = new AuthTokenProvider { + override def apply(credentials: Credentials): UIO[Option[AuthToken]] = UIO.pure(Some(AuthToken(token))) + } } private class AnonymousAuthTokenProvider extends AuthTokenProvider {