From 679d762eee82e81b2cf8bf84c8dc11978e672e87 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger <43503240+paullatzelsperger@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:50:00 +0100 Subject: [PATCH] refactor: rename identity-hub-core module (#184) * renamed -core to -credentials * DEPENDENCIES --- DEPENDENCIES | 13 ++++-------- .../api/PresentationApiExtension.java | 6 +++--- .../api/v1/PresentationApiController.java | 10 +++++----- .../api/v1/PresentationApiControllerTest.java | 4 ++-- .../build.gradle.kts | 0 .../identityhub/DefaultServicesExtension.java | 0 .../core/CoreServicesExtension.java | 6 +++--- .../core/CredentialQueryResolverImpl.java | 19 ++---------------- .../PresentationCreationServiceImpl.java} | 6 +++--- .../core/PresentationCreatorRegistryImpl.java | 0 .../core/creators/JwtPresentationCreator.java | 0 .../core/creators/LdpPresentationCreator.java | 0 .../EdcScopeToCriterionTransformer.java | 0 .../defaults/InMemoryCredentialStore.java | 0 .../verification/AccessTokenVerifierImpl.java | 0 ...rg.eclipse.edc.spi.system.ServiceExtension | 0 .../src/main/resources/credentials.v1.json | 0 .../src/main/resources/did.json | 0 .../src/main/resources/jws2020.json | 0 .../resources/presentation-exchange.v1.json | 0 .../resources/presentation-query.v08.json | 0 .../resources/presentation-submission.v1.json | 0 .../core/CredentialQueryResolverImplTest.java | 0 .../PresentationCreationServiceImplTest.java} | 20 +++++++++---------- .../creators/JwtPresentationCreatorTest.java | 0 .../creators/LdpPresentationCreatorTest.java | 0 .../creators/PresentationCreatorTest.java | 0 .../identityhub/core/creators/TestData.java | 0 .../EdcScopeToCriterionTransformerTest.java | 0 .../defaults/InMemoryCredentialStoreTest.java | 0 .../AccessTokenVerifierImplTest.java | 0 .../src/test/resources/credentials.v1.json | 0 .../src/test/resources/did.json | 0 .../src/test/resources/examples.v1.json | 0 .../src/test/resources/jws2020.json | 0 .../src/test/resources/odrl.jsonld | 0 .../resources/presentation-exchange.v1.json | 0 .../resources/presentation-query.v08.json | 0 .../tests/ResolutionApiComponentTest.java | 6 +++--- launcher/build.gradle.kts | 2 +- settings.gradle.kts | 2 +- ....java => PresentationCreationService.java} | 2 +- 42 files changed, 38 insertions(+), 58 deletions(-) rename core/{identity-hub-core => identity-hub-credentials}/build.gradle.kts (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java (96%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java (85%) rename core/{identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImpl.java => identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImpl.java} (93%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImpl.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreator.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreator.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformer.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStore.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImpl.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/credentials.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/did.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/jws2020.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/presentation-exchange.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/presentation-query.v08.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/main/resources/presentation-submission.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImplTest.java (100%) rename core/{identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImplTest.java => identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImplTest.java} (90%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreatorTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreatorTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationCreatorTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/core/creators/TestData.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformerTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStoreTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImplTest.java (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/credentials.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/did.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/examples.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/jws2020.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/odrl.jsonld (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/presentation-exchange.v1.json (100%) rename core/{identity-hub-core => identity-hub-credentials}/src/test/resources/presentation-query.v08.json (100%) rename spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/{PresentationGenerator.java => PresentationCreationService.java} (97%) diff --git a/DEPENDENCIES b/DEPENDENCIES index 5edf2bf7b..b9a2a79fd 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -11,12 +11,10 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.1, Apache maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.2, Apache-2.0, approved, #5303 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.1, Apache-2.0, approved, #7947 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.2, Apache-2.0, approved, #7947 -maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.3, Apache-2.0, approved, #7947 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.16.0, Apache-2.0, approved, #11606 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.14.1, Apache-2.0 AND MIT, approved, #4303 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.14.2, Apache-2.0 AND MIT, approved, #4303 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.1, MIT AND Apache-2.0, approved, #7932 -maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.3, MIT AND Apache-2.0, approved, #7932 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.16.0, Apache-2.0 AND MIT, approved, #11602 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.11.0, Apache-2.0, approved, CQ23093 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.0, Apache-2.0, approved, #4105 @@ -24,19 +22,16 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.1, Apache-2. maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2.0, approved, #4105 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.1, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.2, Apache-2.0, approved, #7934 -maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.3, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.16.0, Apache-2.0, approved, #11605 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.1, Apache-2.0, approved, #8802 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.2, Apache-2.0, approved, #8802 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.16.0, , restricted, clearlydefined -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.15.3, Apache-2.0, approved, #9179 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.16.0, , restricted, clearlydefined maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.0, Apache-2.0, approved, #4699 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.2, Apache-2.0, approved, #4699 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.1, Apache-2.0, approved, #7930 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.2, Apache-2.0, approved, #7930 -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.3, Apache-2.0, approved, #7930 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.16.0, , restricted, clearlydefined maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.16.0, , restricted, clearlydefined maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.15.1, Apache-2.0, approved, #9236 @@ -318,12 +313,12 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.10, Apache-2.0, maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.9.10, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.8.21, Apache-2.0, approved, #8919 maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.9.10, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.10, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.10, Apache-2.0, approved, #11827 maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains/annotations/24.0.1, Apache-2.0, approved, #7417 maven/mavencentral/org.jetbrains/annotations/24.1.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.junit-pioneer/junit-pioneer/2.1.0, EPL-2.0, approved, #10550 +maven/mavencentral/org.junit-pioneer/junit-pioneer/2.2.0, , restricted, clearlydefined maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.1, EPL-2.0, approved, #9714 maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.1, EPL-2.0, approved, #9711 maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.1, EPL-2.0, approved, #9708 @@ -360,9 +355,9 @@ maven/mavencentral/org.slf4j/slf4j-api/2.0.5, MIT, approved, #5915 maven/mavencentral/org.slf4j/slf4j-api/2.0.6, MIT, approved, #5915 maven/mavencentral/org.slf4j/slf4j-api/2.0.9, MIT, approved, #5915 maven/mavencentral/org.testcontainers/junit-jupiter/1.19.1, MIT, approved, #10344 -maven/mavencentral/org.testcontainers/junit-jupiter/1.19.2, MIT, approved, #10344 +maven/mavencentral/org.testcontainers/junit-jupiter/1.19.3, MIT, approved, #10344 maven/mavencentral/org.testcontainers/testcontainers/1.19.1, Apache-2.0 AND MIT, approved, #10347 -maven/mavencentral/org.testcontainers/testcontainers/1.19.2, Apache-2.0 AND MIT, approved, #10347 +maven/mavencentral/org.testcontainers/testcontainers/1.19.3, Apache-2.0 AND MIT, approved, #10347 maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272 maven/mavencentral/org.xmlunit/xmlunit-placeholders/2.9.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.yaml/snakeyaml/1.33, Apache-2.0, approved, clearlydefined diff --git a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/PresentationApiExtension.java b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/PresentationApiExtension.java index d1cdfe997..e169ec60e 100644 --- a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/PresentationApiExtension.java +++ b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/PresentationApiExtension.java @@ -16,7 +16,7 @@ import org.eclipse.edc.core.transform.transformer.to.JsonValueToGenericTypeTransformer; import org.eclipse.edc.iam.identitytrust.transform.to.JsonObjectToPresentationQueryTransformer; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; import org.eclipse.edc.identityservice.api.v1.PresentationApiController; @@ -58,7 +58,7 @@ public class PresentationApiExtension implements ServiceExtension { private CredentialQueryResolver credentialResolver; @Inject - private PresentationGenerator presentationGenerator; + private PresentationCreationService presentationCreationService; @Inject private JsonLd jsonLd; @@ -72,7 +72,7 @@ public void initialize(ServiceExtensionContext context) { validatorRegistry.register(PresentationQuery.PRESENTATION_QUERY_TYPE_PROPERTY, new PresentationQueryValidator()); - var controller = new PresentationApiController(validatorRegistry, typeTransformer, credentialResolver, accessTokenVerifier, presentationGenerator, context.getMonitor()); + var controller = new PresentationApiController(validatorRegistry, typeTransformer, credentialResolver, accessTokenVerifier, presentationCreationService, context.getMonitor()); var jsonLdMapper = typeManager.getMapper(JSON_LD); webService.registerResource(RESOLUTION_CONTEXT, new ObjectMapperProvider(jsonLdMapper)); diff --git a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/v1/PresentationApiController.java b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/v1/PresentationApiController.java index d33339204..e30cabb93 100644 --- a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/v1/PresentationApiController.java +++ b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityservice/api/v1/PresentationApiController.java @@ -22,7 +22,7 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Response; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQuery; @@ -53,16 +53,16 @@ public class PresentationApiController implements PresentationApi { private final TypeTransformerRegistry transformerRegistry; private final CredentialQueryResolver queryResolver; private final AccessTokenVerifier accessTokenVerifier; - private final PresentationGenerator presentationGenerator; + private final PresentationCreationService presentationCreationService; private final Monitor monitor; public PresentationApiController(JsonObjectValidatorRegistry validatorRegistry, TypeTransformerRegistry transformerRegistry, CredentialQueryResolver queryResolver, - AccessTokenVerifier accessTokenVerifier, PresentationGenerator presentationGenerator, Monitor monitor) { + AccessTokenVerifier accessTokenVerifier, PresentationCreationService presentationCreationService, Monitor monitor) { this.validatorRegistry = validatorRegistry; this.transformerRegistry = transformerRegistry; this.queryResolver = queryResolver; this.accessTokenVerifier = accessTokenVerifier; - this.presentationGenerator = presentationGenerator; + this.presentationCreationService = presentationCreationService; this.monitor = monitor; } @@ -91,7 +91,7 @@ public Response queryPresentation(JsonObject query, @HeaderParam(AUTHORIZATION) // package the credentials in a VP and sign var audience = getAudience(token); - var presentationResponse = presentationGenerator.createPresentation(credentials.toList(), presentationQuery.getPresentationDefinition(), audience) + var presentationResponse = presentationCreationService.createPresentation(credentials.toList(), presentationQuery.getPresentationDefinition(), audience) .orElseThrow(failure -> new EdcException("Error creating VerifiablePresentation: %s".formatted(failure.getFailureDetail()))); return Response.ok() .entity(presentationResponse) diff --git a/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/v1/PresentationApiControllerTest.java b/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/v1/PresentationApiControllerTest.java index 06c10448b..025fdc36f 100644 --- a/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/v1/PresentationApiControllerTest.java +++ b/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/v1/PresentationApiControllerTest.java @@ -16,7 +16,7 @@ import com.nimbusds.jwt.JWTClaimsSet; import jakarta.json.JsonObject; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.resolution.QueryResult; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; @@ -71,7 +71,7 @@ class PresentationApiControllerTest extends RestControllerTestBase { private final TypeTransformerRegistry typeTransformerRegistry = mock(); private final CredentialQueryResolver queryResolver = mock(); private final AccessTokenVerifier accessTokenVerifier = mock(); - private final PresentationGenerator generator = mock(); + private final PresentationCreationService generator = mock(); @Test diff --git a/core/identity-hub-core/build.gradle.kts b/core/identity-hub-credentials/build.gradle.kts similarity index 100% rename from core/identity-hub-core/build.gradle.kts rename to core/identity-hub-credentials/build.gradle.kts diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java similarity index 96% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java index 78609d71a..f8292692f 100644 --- a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CoreServicesExtension.java @@ -20,8 +20,8 @@ import org.eclipse.edc.identityhub.core.creators.JwtPresentationCreator; import org.eclipse.edc.identityhub.core.creators.LdpPresentationCreator; import org.eclipse.edc.identityhub.spi.ScopeToCriterionTransformer; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.generator.PresentationCreatorRegistry; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; import org.eclipse.edc.identityhub.spi.model.IdentityHubConstants; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.store.CredentialStore; @@ -145,8 +145,8 @@ public PresentationCreatorRegistry presentationCreatorRegistry(ServiceExtensionC } @Provider - public PresentationGenerator presentationGenerator(ServiceExtensionContext context) { - return new PresentationGeneratorImpl(CredentialFormat.JSON_LD, presentationCreatorRegistry(context), context.getMonitor()); + public PresentationCreationService presentationGenerator(ServiceExtensionContext context) { + return new PresentationCreationServiceImpl(CredentialFormat.JSON_LD, presentationCreatorRegistry(context), context.getMonitor()); } diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java similarity index 85% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java index 8fb96fc89..b91f3beb5 100644 --- a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImpl.java @@ -25,8 +25,8 @@ import org.eclipse.edc.spi.result.AbstractResult; import org.eclipse.edc.spi.result.Result; +import java.util.HashSet; import java.util.List; -import java.util.function.Predicate; import static org.eclipse.edc.spi.result.Result.failure; import static org.eclipse.edc.spi.result.Result.success; @@ -82,28 +82,13 @@ public QueryResult query(PresentationQuery query, List issuerScopes) { // now narrow down the requested credentials to only contain allowed credentials var content = allowedCred.getContent().toList(); - var isValidQuery = content.equals(requestedCredentials); + var isValidQuery = new HashSet<>(content).containsAll(requestedCredentials); return isValidQuery ? QueryResult.success(requestedCredentials.stream().map(VerifiableCredentialResource::getVerifiableCredential)) : QueryResult.unauthorized("Invalid query: requested Credentials outside of scope."); } - /** - * Returns a predicate that filters {@link VerifiableCredentialResource} objects based on the provided type by - * inspecting the {@code types} property of the {@link org.eclipse.edc.identitytrust.model.VerifiableCredential} that is - * encapsulated in the resource. - * - * @param type The type to filter by. - * @return A predicate that filters {@link VerifiableCredentialResource} objects based on the provided type. - */ - private Predicate credentialsPredicate(String type) { - return resource -> { - var cred = resource.getVerifiableCredential(); - return cred != null && cred.credential() != null && cred.credential().getTypes().contains(type); - }; - } - /** * Parses a list of scope strings, converts them to {@link Criterion} objects, and returns a {@link Result} containing * the list of converted criteria. If any scope string fails to be converted, a failure result is returned. diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImpl.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImpl.java similarity index 93% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImpl.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImpl.java index 0c43e6d56..43e2849a2 100644 --- a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImpl.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImpl.java @@ -15,8 +15,8 @@ package org.eclipse.edc.identityhub.core; import jakarta.json.JsonObject; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.generator.PresentationCreatorRegistry; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; import org.eclipse.edc.identitytrust.model.CredentialFormat; import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.identitytrust.model.credentialservice.PresentationResponse; @@ -33,7 +33,7 @@ import static java.util.Optional.ofNullable; import static org.eclipse.edc.identitytrust.model.CredentialFormat.JSON_LD; -public class PresentationGeneratorImpl implements PresentationGenerator { +public class PresentationCreationServiceImpl implements PresentationCreationService { private final CredentialFormat defaultFormatVp; private final PresentationCreatorRegistry registry; private final Monitor monitor; @@ -43,7 +43,7 @@ public class PresentationGeneratorImpl implements PresentationGenerator { * * @param defaultFormatVp The default format for verifiable presentations. */ - public PresentationGeneratorImpl(CredentialFormat defaultFormatVp, PresentationCreatorRegistry registry, Monitor monitor) { + public PresentationCreationServiceImpl(CredentialFormat defaultFormatVp, PresentationCreatorRegistry registry, Monitor monitor) { this.defaultFormatVp = defaultFormatVp; this.registry = registry; this.monitor = monitor; diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImpl.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImpl.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImpl.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImpl.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreator.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreator.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreator.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreator.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreator.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreator.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreator.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreator.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformer.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformer.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformer.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformer.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStore.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStore.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStore.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStore.java diff --git a/core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImpl.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImpl.java similarity index 100% rename from core/identity-hub-core/src/main/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImpl.java rename to core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImpl.java diff --git a/core/identity-hub-core/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension b/core/identity-hub-credentials/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension similarity index 100% rename from core/identity-hub-core/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension rename to core/identity-hub-credentials/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension diff --git a/core/identity-hub-core/src/main/resources/credentials.v1.json b/core/identity-hub-credentials/src/main/resources/credentials.v1.json similarity index 100% rename from core/identity-hub-core/src/main/resources/credentials.v1.json rename to core/identity-hub-credentials/src/main/resources/credentials.v1.json diff --git a/core/identity-hub-core/src/main/resources/did.json b/core/identity-hub-credentials/src/main/resources/did.json similarity index 100% rename from core/identity-hub-core/src/main/resources/did.json rename to core/identity-hub-credentials/src/main/resources/did.json diff --git a/core/identity-hub-core/src/main/resources/jws2020.json b/core/identity-hub-credentials/src/main/resources/jws2020.json similarity index 100% rename from core/identity-hub-core/src/main/resources/jws2020.json rename to core/identity-hub-credentials/src/main/resources/jws2020.json diff --git a/core/identity-hub-core/src/main/resources/presentation-exchange.v1.json b/core/identity-hub-credentials/src/main/resources/presentation-exchange.v1.json similarity index 100% rename from core/identity-hub-core/src/main/resources/presentation-exchange.v1.json rename to core/identity-hub-credentials/src/main/resources/presentation-exchange.v1.json diff --git a/core/identity-hub-core/src/main/resources/presentation-query.v08.json b/core/identity-hub-credentials/src/main/resources/presentation-query.v08.json similarity index 100% rename from core/identity-hub-core/src/main/resources/presentation-query.v08.json rename to core/identity-hub-credentials/src/main/resources/presentation-query.v08.json diff --git a/core/identity-hub-core/src/main/resources/presentation-submission.v1.json b/core/identity-hub-credentials/src/main/resources/presentation-submission.v1.json similarity index 100% rename from core/identity-hub-core/src/main/resources/presentation-submission.v1.json rename to core/identity-hub-credentials/src/main/resources/presentation-submission.v1.json diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImplTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImplTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImplTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/CredentialQueryResolverImplTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImplTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImplTest.java similarity index 90% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImplTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImplTest.java index ea14f597e..6082e8ad1 100644 --- a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/PresentationGeneratorImplTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreationServiceImplTest.java @@ -48,18 +48,18 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -class PresentationGeneratorImplTest { +class PresentationCreationServiceImplTest { private final Monitor monitor = mock(); private final PresentationCreatorRegistry registry = mock(); private final ObjectMapper mapper = JacksonJsonLd.createObjectMapper(); - private PresentationGeneratorImpl presentationGenerator; + private PresentationCreationServiceImpl presentationGenerator; @Test void generate_noCredentials() { when(registry.createPresentation(anyList(), eq(JSON_LD), any())).thenReturn(jsonObject(EMPTY_LDP_VP)); - presentationGenerator = new PresentationGeneratorImpl(JSON_LD, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JSON_LD, registry, monitor); List ldpVcs = List.of(); var result = presentationGenerator.createPresentation(ldpVcs, null, null); @@ -69,7 +69,7 @@ void generate_noCredentials() { @Test void generate_defaultFormatLdp_containsOnlyLdpVc() { when(registry.createPresentation(any(), eq(JSON_LD), any())).thenReturn(jsonObject(LDP_VP_WITH_PROOF)); - presentationGenerator = new PresentationGeneratorImpl(JSON_LD, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JSON_LD, registry, monitor); var credentials = List.of(createCredential(JSON_LD), createCredential(JSON_LD)); var result = presentationGenerator.createPresentation(credentials, null, null); @@ -82,7 +82,7 @@ void generate_defaultFormatLdp_containsOnlyLdpVc() { void generate_defaultFormatLdp_mixedVcs() { when(registry.createPresentation(any(), eq(JSON_LD), any())).thenReturn(jsonObject(LDP_VP_WITH_PROOF)); when(registry.createPresentation(any(), eq(JWT), any())).thenReturn(JWT_VP); - presentationGenerator = new PresentationGeneratorImpl(JSON_LD, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JSON_LD, registry, monitor); var credentials = List.of(createCredential(JSON_LD), createCredential(JWT)); @@ -97,7 +97,7 @@ void generate_defaultFormatLdp_mixedVcs() { void generate_defaultFormatLdp_onlyJwtVcs() { when(registry.createPresentation(any(), eq(JWT), any())).thenReturn(JWT_VP); when(registry.createPresentation(any(), eq(JSON_LD), any())).thenReturn(jsonObject(EMPTY_LDP_VP)); - presentationGenerator = new PresentationGeneratorImpl(JSON_LD, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JSON_LD, registry, monitor); var credentials = List.of(createCredential(JWT), createCredential(JWT)); @@ -112,7 +112,7 @@ void generate_defaultFormatLdp_onlyJwtVcs() { void generate_defaultFormatJwt_onlyJwtVcs() { when(registry.createPresentation(any(), eq(JWT), any())).thenReturn(JWT_VP); when(registry.createPresentation(any(), eq(JSON_LD), any())).thenReturn(jsonObject(EMPTY_LDP_VP)); - presentationGenerator = new PresentationGeneratorImpl(JWT, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JWT, registry, monitor); var credentials = List.of(createCredential(JWT), createCredential(JWT)); @@ -126,7 +126,7 @@ void generate_defaultFormatJwt_onlyJwtVcs() { void generate_defaultFormatJwt_mixedVcs() { when(registry.createPresentation(any(), eq(JSON_LD), any())).thenReturn(jsonObject(LDP_VP_WITH_PROOF)); when(registry.createPresentation(any(), eq(JWT), any())).thenReturn(JWT_VP); - presentationGenerator = new PresentationGeneratorImpl(JWT, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JWT, registry, monitor); var credentials = List.of(createCredential(JSON_LD), createCredential(JWT)); @@ -139,7 +139,7 @@ void generate_defaultFormatJwt_mixedVcs() { @Test void generate_defaultFormatJwt_onlyLdpVc() { when(registry.createPresentation(any(), eq(JWT), any())).thenReturn(JWT_VP); - presentationGenerator = new PresentationGeneratorImpl(JWT, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JWT, registry, monitor); var credentials = List.of(createCredential(JSON_LD), createCredential(JSON_LD)); var result = presentationGenerator.createPresentation(credentials, null, null); @@ -151,7 +151,7 @@ void generate_defaultFormatJwt_onlyLdpVc() { @Test void generate_withPresentationDef_shouldLogWarning() { - presentationGenerator = new PresentationGeneratorImpl(JSON_LD, registry, monitor); + presentationGenerator = new PresentationCreationServiceImpl(JSON_LD, registry, monitor); presentationGenerator.createPresentation(List.of(), PresentationDefinition.Builder.newInstance().id("test-id").build(), null); verify(monitor).warning(contains("A PresentationDefinition was submitted, but is currently ignored by the generator.")); diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreatorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreatorTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreatorTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationCreatorTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreatorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreatorTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreatorTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationCreatorTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationCreatorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationCreatorTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationCreatorTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationCreatorTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/TestData.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/TestData.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/core/creators/TestData.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/TestData.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformerTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformerTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformerTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/defaults/EdcScopeToCriterionTransformerTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStoreTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStoreTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStoreTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/defaults/InMemoryCredentialStoreTest.java diff --git a/core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImplTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImplTest.java similarity index 100% rename from core/identity-hub-core/src/test/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImplTest.java rename to core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/token/verification/AccessTokenVerifierImplTest.java diff --git a/core/identity-hub-core/src/test/resources/credentials.v1.json b/core/identity-hub-credentials/src/test/resources/credentials.v1.json similarity index 100% rename from core/identity-hub-core/src/test/resources/credentials.v1.json rename to core/identity-hub-credentials/src/test/resources/credentials.v1.json diff --git a/core/identity-hub-core/src/test/resources/did.json b/core/identity-hub-credentials/src/test/resources/did.json similarity index 100% rename from core/identity-hub-core/src/test/resources/did.json rename to core/identity-hub-credentials/src/test/resources/did.json diff --git a/core/identity-hub-core/src/test/resources/examples.v1.json b/core/identity-hub-credentials/src/test/resources/examples.v1.json similarity index 100% rename from core/identity-hub-core/src/test/resources/examples.v1.json rename to core/identity-hub-credentials/src/test/resources/examples.v1.json diff --git a/core/identity-hub-core/src/test/resources/jws2020.json b/core/identity-hub-credentials/src/test/resources/jws2020.json similarity index 100% rename from core/identity-hub-core/src/test/resources/jws2020.json rename to core/identity-hub-credentials/src/test/resources/jws2020.json diff --git a/core/identity-hub-core/src/test/resources/odrl.jsonld b/core/identity-hub-credentials/src/test/resources/odrl.jsonld similarity index 100% rename from core/identity-hub-core/src/test/resources/odrl.jsonld rename to core/identity-hub-credentials/src/test/resources/odrl.jsonld diff --git a/core/identity-hub-core/src/test/resources/presentation-exchange.v1.json b/core/identity-hub-credentials/src/test/resources/presentation-exchange.v1.json similarity index 100% rename from core/identity-hub-core/src/test/resources/presentation-exchange.v1.json rename to core/identity-hub-credentials/src/test/resources/presentation-exchange.v1.json diff --git a/core/identity-hub-core/src/test/resources/presentation-query.v08.json b/core/identity-hub-credentials/src/test/resources/presentation-query.v08.json similarity index 100% rename from core/identity-hub-core/src/test/resources/presentation-query.v08.json rename to core/identity-hub-credentials/src/test/resources/presentation-query.v08.json diff --git a/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/ResolutionApiComponentTest.java b/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/ResolutionApiComponentTest.java index 25709685f..852af3f31 100644 --- a/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/ResolutionApiComponentTest.java +++ b/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/ResolutionApiComponentTest.java @@ -15,7 +15,7 @@ package org.eclipse.edc.identityhub.tests; import com.nimbusds.jose.jwk.ECKey; -import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; +import org.eclipse.edc.identityhub.spi.generator.PresentationCreationService; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.resolution.QueryResult; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; @@ -66,7 +66,7 @@ public class ResolutionApiComponentTest { .build(); // todo: these mocks should be replaced, once their respective implementations exist! private static final CredentialQueryResolver CREDENTIAL_QUERY_RESOLVER = mock(); - private static final PresentationGenerator PRESENTATION_GENERATOR = mock(); + private static final PresentationCreationService PRESENTATION_GENERATOR = mock(); private static final AccessTokenVerifier ACCESS_TOKEN_VERIFIER = mock(); @RegisterExtension @@ -75,7 +75,7 @@ public class ResolutionApiComponentTest { static { runtime = new EdcRuntimeExtension(":launcher", "identity-hub", IDENTITY_HUB_PARTICIPANT.controlPlaneConfiguration()); runtime.registerServiceMock(CredentialQueryResolver.class, CREDENTIAL_QUERY_RESOLVER); - runtime.registerServiceMock(PresentationGenerator.class, PRESENTATION_GENERATOR); + runtime.registerServiceMock(PresentationCreationService.class, PRESENTATION_GENERATOR); runtime.registerServiceMock(AccessTokenVerifier.class, ACCESS_TOKEN_VERIFIER); } diff --git a/launcher/build.gradle.kts b/launcher/build.gradle.kts index 6b9bd93a0..963785cdd 100644 --- a/launcher/build.gradle.kts +++ b/launcher/build.gradle.kts @@ -20,7 +20,7 @@ plugins { dependencies { runtimeOnly(project(":core:identity-hub-api")) - runtimeOnly(project(":core:identity-hub-core")) + runtimeOnly(project(":core:identity-hub-credentials")) runtimeOnly(project(":extensions:cryptography:public-key-provider")) runtimeOnly(libs.edc.identity.did.core) runtimeOnly(libs.edc.identity.did.web) diff --git a/settings.gradle.kts b/settings.gradle.kts index 9cd0b8359..d2379206a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,7 +28,7 @@ include(":spi:identity-hub-store-spi") // core modules include(":core:identity-hub-api") -include(":core:identity-hub-core") +include(":core:identity-hub-credentials") // extension modules include(":extensions:cryptography:public-key-provider") diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationGenerator.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreationService.java similarity index 97% rename from spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationGenerator.java rename to spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreationService.java index 2ab3d02f9..62d8e0af1 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationGenerator.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreationService.java @@ -27,7 +27,7 @@ * and an optional presentation definition. */ @FunctionalInterface -public interface PresentationGenerator { +public interface PresentationCreationService { /** * Creates a presentation based on a list of verifiable credentials and an optional presentation definition. *