From b3a53e35e2a527ff2fca9617c98263da3dc8f1cd Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger <43503240+paullatzelsperger@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:23:22 +0200 Subject: [PATCH] fix(build): update package imports (#315) * fix(build): update package imports * DEPENDENCIES --- DEPENDENCIES | 32 +++++++++---------- core/identity-hub-api/build.gradle.kts | 1 + .../api/PresentationApiExtension.java | 8 ++--- .../api/v1/PresentationApiController.java | 4 +-- .../PresentationQueryValidator.java | 2 +- .../api/v1/PresentationApiControllerTest.java | 12 +++---- .../PresentationQueryValidatorTest.java | 10 +++--- .../identityhub/DefaultServicesExtension.java | 2 +- .../core/CoreServicesExtension.java | 4 +-- .../core/CredentialQueryResolverImpl.java | 2 +- .../core/PresentationCreatorRegistryImpl.java | 4 +-- .../VerifiablePresentationServiceImpl.java | 14 ++++---- .../creators/JwtPresentationGenerator.java | 2 +- .../creators/LdpPresentationGenerator.java | 6 ++-- .../defaults/CredentialResourceLookup.java | 2 +- .../InMemorySignatureSuiteRegistry.java | 2 +- .../core/CredentialQueryResolverImplTest.java | 14 ++++---- .../PresentationCreatorRegistryImplTest.java | 2 +- ...VerifiablePresentationServiceImplTest.java | 16 +++++----- .../JwtPresentationGeneratorTest.java | 4 +-- .../LdpPresentationGeneratorTest.java | 6 ++-- .../creators/PresentationGeneratorTest.java | 6 ++-- .../tests/PresentationApiComponentTest.java | 6 ++-- ...erifiableCredentialsApiControllerTest.java | 10 +++--- .../sql/credentials/SqlCredentialStore.java | 6 ++-- .../PresentationCreatorRegistry.java | 5 +-- .../spi/generator/PresentationGenerator.java | 3 +- .../VerifiablePresentationService.java | 6 ++-- .../spi/model/IdentityHubConstants.java | 3 +- .../model/VerifiableCredentialResource.java | 10 +++--- .../resolution/CredentialQueryResolver.java | 5 +-- .../spi/resolution/QueryResult.java | 26 +++++++-------- .../store/test/CredentialStoreTestBase.java | 10 +++--- 33 files changed, 124 insertions(+), 121 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index b2fddcd24..272d79b95 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -8,7 +8,6 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.10.3, Apache maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.0, Apache-2.0, approved, #5303 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.1, 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.2, Apache-2.0, approved, #11606 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.17.0, Apache-2.0, approved, #13672 @@ -20,23 +19,21 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.0, Apache-2. maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.1, Apache-2.0, approved, #4105 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.2, Apache-2.0, approved, #11605 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.17.0, Apache-2.0, approved, #13671 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.2, Apache-2.0, approved, #11855 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.17.0, Apache-2.0, approved, #13669 -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.16.2, Apache-2.0, approved, #11854 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.17.0, Apache-2.0, approved, #14161 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.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.16.2, Apache-2.0, approved, #11853 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.17.0, Apache-2.0, approved, #14160 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.17.0, Apache-2.0, approved, #14194 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.15.1, Apache-2.0, approved, #9236 -maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.15.2, Apache-2.0, approved, #9236 +maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.16.2, Apache-2.0, approved, #11858 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.17.0, Apache-2.0, approved, #14195 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.15.3, Apache-2.0, approved, #9241 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.17.0, Apache-2.0, approved, #13668 @@ -107,7 +104,7 @@ maven/mavencentral/dev.failsafe/failsafe-okhttp/3.3.2, Apache-2.0, approved, #91 maven/mavencentral/dev.failsafe/failsafe/3.3.2, Apache-2.0, approved, #9268 maven/mavencentral/info.picocli/picocli/4.7.5, Apache-2.0, approved, #4365 maven/mavencentral/io.github.classgraph/classgraph/4.8.154, MIT, approved, CQ22530 -maven/mavencentral/io.github.classgraph/classgraph/4.8.162, MIT, approved, CQ22530 +maven/mavencentral/io.github.classgraph/classgraph/4.8.165, MIT, approved, CQ22530 maven/mavencentral/io.netty/netty-buffer/4.1.86.Final, Apache-2.0, approved, CQ21842 maven/mavencentral/io.netty/netty-codec-http/4.1.86.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-http2/4.1.86.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 @@ -135,21 +132,21 @@ maven/mavencentral/io.rest-assured/rest-assured/5.4.0, Apache-2.0, approved, #12 maven/mavencentral/io.rest-assured/xml-path/5.4.0, Apache-2.0, approved, #12038 maven/mavencentral/io.setl/rdf-urdna/1.1, Apache-2.0, approved, clearlydefined maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.15, Apache-2.0, approved, #5947 -maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.18, Apache-2.0, approved, #5947 +maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.21, Apache-2.0, approved, #5947 maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.15, Apache-2.0, approved, #11362 maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.8, Apache-2.0, approved, #11362 maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, approved, #5929 -maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.18, Apache-2.0, approved, #5929 +maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.21, Apache-2.0, approved, #5929 maven/mavencentral/io.swagger.core.v3/swagger-core/2.2.15, Apache-2.0, approved, #9265 maven/mavencentral/io.swagger.core.v3/swagger-core/2.2.8, Apache-2.0, approved, #9265 maven/mavencentral/io.swagger.core.v3/swagger-integration-jakarta/2.2.15, Apache-2.0, approved, #11475 -maven/mavencentral/io.swagger.core.v3/swagger-integration-jakarta/2.2.18, Apache-2.0, approved, #11475 +maven/mavencentral/io.swagger.core.v3/swagger-integration-jakarta/2.2.21, Apache-2.0, approved, #11475 maven/mavencentral/io.swagger.core.v3/swagger-integration/2.2.15, Apache-2.0, approved, #10352 maven/mavencentral/io.swagger.core.v3/swagger-jaxrs2-jakarta/2.2.15, Apache-2.0, approved, #11477 -maven/mavencentral/io.swagger.core.v3/swagger-jaxrs2-jakarta/2.2.18, Apache-2.0, approved, #11477 +maven/mavencentral/io.swagger.core.v3/swagger-jaxrs2-jakarta/2.2.21, Apache-2.0, approved, #11477 maven/mavencentral/io.swagger.core.v3/swagger-jaxrs2/2.2.15, Apache-2.0, approved, #9814 maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.15, Apache-2.0, approved, #5919 -maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.18, Apache-2.0, approved, #5919 +maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.21, Apache-2.0, approved, #5919 maven/mavencentral/io.swagger.core.v3/swagger-models/2.2.15, Apache-2.0, approved, #10353 maven/mavencentral/io.swagger.core.v3/swagger-models/2.2.8, Apache-2.0, approved, #10353 maven/mavencentral/io.swagger.parser.v3/swagger-parser-core/2.1.10, Apache-2.0, approved, #11478 @@ -197,7 +194,7 @@ maven/mavencentral/org.apache.commons/commons-digester3/3.2, Apache-2.0, approve maven/mavencentral/org.apache.commons/commons-lang3/3.10, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.commons/commons-lang3/3.11, Apache-2.0, approved, CQ22642 maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.apache.commons/commons-lang3/3.13.0, Apache-2.0, approved, #9820 +maven/mavencentral/org.apache.commons/commons-lang3/3.14.0, Apache-2.0, approved, #11677 maven/mavencentral/org.apache.commons/commons-lang3/3.7, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.commons/commons-lang3/3.8.1, Apache-2.0, approved, #815 maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, clearlydefined @@ -223,7 +220,7 @@ maven/mavencentral/org.apache.velocity/velocity-engine-scripting/2.3, Apache-2.0 maven/mavencentral/org.apache.xbean/xbean-reflect/3.7, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.assertj/assertj-core/3.25.3, Apache-2.0, approved, #12585 -maven/mavencentral/org.awaitility/awaitility/4.2.0, Apache-2.0, approved, #14178 +maven/mavencentral/org.awaitility/awaitility/4.2.1, Apache-2.0, approved, #14178 maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.72, MIT, approved, #3789 maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.77, MIT, approved, #11593 maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.72, MIT AND CC0-1.0, approved, #3538 @@ -344,10 +341,11 @@ maven/mavencentral/org.jacoco/org.jacoco.core/0.8.11, EPL-2.0, approved, CQ23283 maven/mavencentral/org.jacoco/org.jacoco.report/0.8.11, EPL-2.0 AND Apache-2.0, approved, CQ23284 maven/mavencentral/org.javassist/javassist/3.28.0-GA, Apache-2.0 OR LGPL-2.1-or-later OR MPL-1.1, approved, #327 maven/mavencentral/org.javassist/javassist/3.29.2-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 +maven/mavencentral/org.javassist/javassist/3.30.2-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #12108 maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.10, Apache-2.0, approved, #14186 -maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.9.10, None, restricted, #14193 +maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.9.10, Apache-2.0, approved, #14193 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, None, restricted, #14191 +maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.9.10, Apache-2.0, approved, #14191 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 @@ -380,7 +378,7 @@ maven/mavencentral/org.ow2.asm/asm-commons/9.6, BSD-3-Clause, approved, #10775 maven/mavencentral/org.ow2.asm/asm-tree/9.6, BSD-3-Clause, approved, #10773 maven/mavencentral/org.ow2.asm/asm/9.1, BSD-3-Clause, approved, CQ23029 maven/mavencentral/org.ow2.asm/asm/9.6, BSD-3-Clause, approved, #10776 -maven/mavencentral/org.postgresql/postgresql/42.7.2, BSD-2-Clause AND Apache-2.0, approved, #11681 +maven/mavencentral/org.postgresql/postgresql/42.7.3, BSD-2-Clause AND Apache-2.0, approved, #11681 maven/mavencentral/org.reflections/reflections/0.10.2, Apache-2.0 AND WTFPL, approved, clearlydefined maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined maven/mavencentral/org.slf4j/slf4j-api/1.7.22, MIT, approved, CQ11943 diff --git a/core/identity-hub-api/build.gradle.kts b/core/identity-hub-api/build.gradle.kts index ca42301a1..abc12497e 100644 --- a/core/identity-hub-api/build.gradle.kts +++ b/core/identity-hub-api/build.gradle.kts @@ -25,6 +25,7 @@ dependencies { api(project(":spi:identity-hub-spi")) implementation(libs.edc.spi.validator) implementation(libs.edc.spi.web) + implementation(libs.edc.spi.identitytrust) implementation(libs.edc.core.jerseyproviders) implementation(libs.edc.core.transform) implementation(libs.edc.iatp.transform) diff --git a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/PresentationApiExtension.java b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/PresentationApiExtension.java index 163050932..8517f6c0d 100644 --- a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/PresentationApiExtension.java +++ b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/PresentationApiExtension.java @@ -15,6 +15,7 @@ package org.eclipse.edc.identityhub.api; import org.eclipse.edc.core.transform.transformer.edc.to.JsonValueToGenericTypeTransformer; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.iam.identitytrust.transform.to.JsonObjectToPresentationQueryTransformer; import org.eclipse.edc.identityhub.api.v1.PresentationApiController; import org.eclipse.edc.identityhub.api.validation.PresentationQueryValidator; @@ -22,7 +23,6 @@ import org.eclipse.edc.identityhub.spi.generator.VerifiablePresentationService; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; @@ -31,12 +31,12 @@ import org.eclipse.edc.spi.types.TypeManager; import org.eclipse.edc.transform.spi.TypeTransformerRegistry; import org.eclipse.edc.validator.spi.JsonObjectValidatorRegistry; -import org.eclipse.edc.web.jersey.jsonld.JerseyJsonLdInterceptor; -import org.eclipse.edc.web.jersey.jsonld.ObjectMapperProvider; +import org.eclipse.edc.web.jersey.providers.jsonld.JerseyJsonLdInterceptor; +import org.eclipse.edc.web.jersey.providers.jsonld.ObjectMapperProvider; import org.eclipse.edc.web.spi.WebService; +import static org.eclipse.edc.iam.identitytrust.spi.VcConstants.IATP_CONTEXT_URL; import static org.eclipse.edc.identityhub.api.PresentationApiExtension.NAME; -import static org.eclipse.edc.identitytrust.VcConstants.IATP_CONTEXT_URL; import static org.eclipse.edc.spi.constants.CoreConstants.JSON_LD; @Extension(value = NAME) diff --git a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/v1/PresentationApiController.java b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/v1/PresentationApiController.java index 6ac61a6b8..19678449a 100644 --- a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/v1/PresentationApiController.java +++ b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/v1/PresentationApiController.java @@ -23,12 +23,12 @@ import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Response; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.identityhub.spi.ParticipantContextService; import org.eclipse.edc.identityhub.spi.generator.VerifiablePresentationService; import org.eclipse.edc.identityhub.spi.model.participant.ParticipantContext; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.jwt.spi.JwtRegisteredClaimNames; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.monitor.Monitor; @@ -46,8 +46,8 @@ import static jakarta.ws.rs.core.HttpHeaders.AUTHORIZATION; import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; +import static org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage.PRESENTATION_QUERY_MESSAGE_TYPE_PROPERTY; import static org.eclipse.edc.identityhub.spi.ParticipantContextId.onEncoded; -import static org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage.PRESENTATION_QUERY_MESSAGE_TYPE_PROPERTY; import static org.eclipse.edc.web.spi.exception.ServiceResultHandler.exceptionMapper; @Consumes(APPLICATION_JSON) diff --git a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/validation/PresentationQueryValidator.java b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/validation/PresentationQueryValidator.java index eb9822e6a..d03a1e67d 100644 --- a/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/validation/PresentationQueryValidator.java +++ b/core/identity-hub-api/src/main/java/org/eclipse/edc/identityhub/api/validation/PresentationQueryValidator.java @@ -17,7 +17,7 @@ import jakarta.json.JsonArray; import jakarta.json.JsonObject; import jakarta.json.JsonValue; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.jsonld.spi.JsonLdKeywords; import org.eclipse.edc.validator.spi.ValidationResult; import org.eclipse.edc.validator.spi.Validator; 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 4e3fdd3a5..2076ccee0 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 @@ -17,6 +17,11 @@ import com.nimbusds.jwt.JWTClaimsSet; import jakarta.json.Json; import jakarta.json.JsonObject; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.InputDescriptorMapping; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationResponseMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationSubmission; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.identityhub.api.v1.PresentationApiController; import org.eclipse.edc.identityhub.spi.ParticipantContextService; import org.eclipse.edc.identityhub.spi.generator.VerifiablePresentationService; @@ -24,11 +29,6 @@ import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.resolution.QueryResult; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; -import org.eclipse.edc.identitytrust.model.credentialservice.InputDescriptorMapping; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationResponseMessage; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationSubmission; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.junit.annotations.ApiTest; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.result.Result; @@ -52,10 +52,10 @@ import static jakarta.json.Json.createObjectBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage.PRESENTATION_QUERY_MESSAGE_TYPE_PROPERTY; import static org.eclipse.edc.identityhub.junit.testfixtures.VerifiableCredentialTestUtil.buildSignedJwt; import static org.eclipse.edc.identityhub.junit.testfixtures.VerifiableCredentialTestUtil.generateEcKey; import static org.eclipse.edc.identityhub.spi.resolution.QueryResult.success; -import static org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage.PRESENTATION_QUERY_MESSAGE_TYPE_PROPERTY; import static org.eclipse.edc.validator.spi.ValidationResult.failure; import static org.eclipse.edc.validator.spi.ValidationResult.success; import static org.eclipse.edc.validator.spi.Violation.violation; diff --git a/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/validation/PresentationQueryValidatorTest.java b/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/validation/PresentationQueryValidatorTest.java index 77b0198b2..402f6ee04 100644 --- a/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/validation/PresentationQueryValidatorTest.java +++ b/core/identity-hub-api/src/test/java/org/eclipse/edc/identityservice/api/validation/PresentationQueryValidatorTest.java @@ -19,12 +19,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.json.JsonArray; import jakarta.json.JsonObject; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.Constraints; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.Field; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.InputDescriptor; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.identityhub.api.validation.PresentationQueryValidator; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; -import org.eclipse.edc.identitytrust.model.presentationdefinition.Constraints; -import org.eclipse.edc.identitytrust.model.presentationdefinition.Field; -import org.eclipse.edc.identitytrust.model.presentationdefinition.InputDescriptor; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.jsonld.TitaniumJsonLd; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.jsonld.spi.JsonLdKeywords; diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java index b6c532708..88cc04b38 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/DefaultServicesExtension.java @@ -14,6 +14,7 @@ package org.eclipse.edc.identityhub; +import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry; import org.eclipse.edc.identityhub.defaults.EdcScopeToCriterionTransformer; import org.eclipse.edc.identityhub.defaults.InMemoryCredentialStore; import org.eclipse.edc.identityhub.defaults.InMemoryKeyPairResourceStore; @@ -24,7 +25,6 @@ import org.eclipse.edc.identityhub.spi.store.KeyPairResourceStore; import org.eclipse.edc.identityhub.spi.store.ParticipantContextStore; import org.eclipse.edc.identityhub.token.rules.ClaimIsPresentRule; -import org.eclipse.edc.identitytrust.verification.SignatureSuiteRegistry; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.runtime.metamodel.annotation.Provider; diff --git a/core/identity-hub-credentials/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 index 586ceb195..760958b3c 100644 --- a/core/identity-hub-credentials/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 @@ -15,6 +15,8 @@ package org.eclipse.edc.identityhub.core; import org.eclipse.edc.iam.did.spi.resolution.DidPublicKeyResolver; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry; import org.eclipse.edc.identityhub.core.creators.JwtPresentationGenerator; import org.eclipse.edc.identityhub.core.creators.LdpPresentationGenerator; import org.eclipse.edc.identityhub.spi.KeyPairService; @@ -26,8 +28,6 @@ import org.eclipse.edc.identityhub.spi.store.CredentialStore; import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; import org.eclipse.edc.identityhub.token.verification.AccessTokenVerifierImpl; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.verification.SignatureSuiteRegistry; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.jsonld.util.JacksonJsonLd; import org.eclipse.edc.keys.spi.KeyParserRegistry; diff --git a/core/identity-hub-credentials/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 index 8e7f18916..3982214fa 100644 --- a/core/identity-hub-credentials/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 @@ -14,12 +14,12 @@ package org.eclipse.edc.identityhub.core; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.identityhub.spi.ScopeToCriterionTransformer; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.identityhub.spi.resolution.CredentialQueryResolver; import org.eclipse.edc.identityhub.spi.resolution.QueryResult; import org.eclipse.edc.identityhub.spi.store.CredentialStore; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; import org.eclipse.edc.spi.query.Criterion; import org.eclipse.edc.spi.query.QuerySpec; import org.eclipse.edc.spi.result.AbstractResult; diff --git a/core/identity-hub-credentials/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 index 5044a824c..5599f0fc2 100644 --- a/core/identity-hub-credentials/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 @@ -14,14 +14,14 @@ package org.eclipse.edc.identityhub.core; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.KeyPairService; import org.eclipse.edc.identityhub.spi.generator.PresentationCreatorRegistry; import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; import org.eclipse.edc.identityhub.spi.model.KeyPairResource; import org.eclipse.edc.identityhub.spi.model.KeyPairState; import org.eclipse.edc.identityhub.spi.model.ParticipantResource; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.query.Criterion; diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImpl.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImpl.java index 4724dd3b0..b88d5a524 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImpl.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImpl.java @@ -15,12 +15,12 @@ package org.eclipse.edc.identityhub.core; import jakarta.json.JsonObject; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationResponseMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.identityhub.spi.generator.PresentationCreatorRegistry; import org.eclipse.edc.identityhub.spi.generator.VerifiablePresentationService; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationResponseMessage; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.spi.monitor.Monitor; import org.eclipse.edc.spi.result.Result; import org.jetbrains.annotations.Nullable; @@ -33,10 +33,10 @@ import static com.nimbusds.jwt.JWTClaimNames.AUDIENCE; import static java.util.Optional.ofNullable; +import static org.eclipse.edc.iam.identitytrust.spi.VcConstants.VERIFIABLE_PRESENTATION_TYPE; +import static org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat.JSON_LD; import static org.eclipse.edc.identityhub.core.creators.LdpPresentationGenerator.TYPE_ADDITIONAL_DATA; import static org.eclipse.edc.identityhub.core.creators.PresentationGeneratorConstants.CONTROLLER_ADDITIONAL_DATA; -import static org.eclipse.edc.identitytrust.VcConstants.VERIFIABLE_PRESENTATION_TYPE; -import static org.eclipse.edc.identitytrust.model.CredentialFormat.JSON_LD; public class VerifiablePresentationServiceImpl implements VerifiablePresentationService { private final CredentialFormat defaultFormatVp; @@ -86,7 +86,7 @@ public Result createPresentation(String participant if (!ldpVcs.isEmpty()) { // todo: once we support PresentationDefinition, the types list could be dynamic - JsonObject ldpVp = registry.createPresentation(participantContextId, ldpVcs, CredentialFormat.JSON_LD, Map.of( + JsonObject ldpVp = registry.createPresentation(participantContextId, ldpVcs, JSON_LD, Map.of( TYPE_ADDITIONAL_DATA, List.of(VERIFIABLE_PRESENTATION_TYPE), CONTROLLER_ADDITIONAL_DATA, participantContextId)); vpToken.add(ldpVp); diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGenerator.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGenerator.java index 7c066a4ab..6eecea87a 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGenerator.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGenerator.java @@ -14,8 +14,8 @@ package org.eclipse.edc.identityhub.core.creators; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.keys.spi.PrivateKeyResolver; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.iam.TokenRepresentation; diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGenerator.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGenerator.java index 6fa1bce7c..608c78803 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGenerator.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGenerator.java @@ -22,10 +22,10 @@ import jakarta.json.JsonArray; import jakarta.json.JsonArrayBuilder; import jakarta.json.JsonObject; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry; 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.verification.SignatureSuiteRegistry; import org.eclipse.edc.keys.spi.PrivateKeyResolver; import org.eclipse.edc.security.signature.jws2020.JwkMethod; import org.eclipse.edc.security.token.jwt.CryptoConverter; diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/CredentialResourceLookup.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/CredentialResourceLookup.java index 18fe722e6..7ed88f081 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/CredentialResourceLookup.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/CredentialResourceLookup.java @@ -14,8 +14,8 @@ package org.eclipse.edc.identityhub.defaults; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.query.ReflectionPropertyLookup; import org.eclipse.edc.util.reflection.PathItem; import org.eclipse.edc.util.reflection.ReflectionUtil; diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemorySignatureSuiteRegistry.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemorySignatureSuiteRegistry.java index 95b8cb500..1c7b0bd45 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemorySignatureSuiteRegistry.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/defaults/InMemorySignatureSuiteRegistry.java @@ -15,7 +15,7 @@ package org.eclipse.edc.identityhub.defaults; import com.apicatalog.ld.signature.SignatureSuite; -import org.eclipse.edc.identitytrust.verification.SignatureSuiteRegistry; +import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry; import java.util.Collection; import java.util.HashMap; diff --git a/core/identity-hub-credentials/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 index db81e88a4..9e4f652b0 100644 --- a/core/identity-hub-credentials/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 @@ -15,17 +15,17 @@ package org.eclipse.edc.identityhub.core; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; +import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.identityhub.defaults.EdcScopeToCriterionTransformer; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.identityhub.spi.resolution.QueryFailure; import org.eclipse.edc.identityhub.spi.store.CredentialStore; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.CredentialSubject; -import org.eclipse.edc.identitytrust.model.Issuer; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.spi.query.QuerySpec; import org.eclipse.edc.spi.result.StoreResult; import org.jetbrains.annotations.Nullable; diff --git a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImplTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImplTest.java index f8d0f8416..52cfbdeb2 100644 --- a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImplTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/PresentationCreatorRegistryImplTest.java @@ -14,11 +14,11 @@ package org.eclipse.edc.identityhub.core; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; import org.eclipse.edc.identityhub.spi.KeyPairService; import org.eclipse.edc.identityhub.spi.generator.PresentationGenerator; import org.eclipse.edc.identityhub.spi.model.KeyPairResource; import org.eclipse.edc.identityhub.spi.model.KeyPairState; -import org.eclipse.edc.identitytrust.model.CredentialFormat; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.result.ServiceResult; import org.junit.jupiter.api.Test; diff --git a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImplTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImplTest.java index a8e2fdcaf..ae331c38f 100644 --- a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImplTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/VerifiablePresentationServiceImplTest.java @@ -17,13 +17,13 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.json.JsonObject; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; +import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.identityhub.spi.generator.PresentationCreatorRegistry; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.CredentialSubject; -import org.eclipse.edc.identitytrust.model.Issuer; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.jsonld.util.JacksonJsonLd; import org.eclipse.edc.jwt.spi.JwtRegisteredClaimNames; import org.eclipse.edc.spi.monitor.Monitor; @@ -33,11 +33,11 @@ import java.util.List; import java.util.Map; +import static org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat.JSON_LD; +import static org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat.JWT; import static org.eclipse.edc.identityhub.core.creators.TestData.EMPTY_LDP_VP; import static org.eclipse.edc.identityhub.core.creators.TestData.JWT_VP; import static org.eclipse.edc.identityhub.core.creators.TestData.LDP_VP_WITH_PROOF; -import static org.eclipse.edc.identitytrust.model.CredentialFormat.JSON_LD; -import static org.eclipse.edc.identitytrust.model.CredentialFormat.JWT; import static org.eclipse.edc.junit.assertions.AbstractResultAssert.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyList; diff --git a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGeneratorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGeneratorTest.java index a773e6490..4b6cac266 100644 --- a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGeneratorTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/JwtPresentationGeneratorTest.java @@ -19,8 +19,8 @@ import com.nimbusds.jose.jwk.Curve; import com.nimbusds.jwt.JWTClaimsSet; import com.nimbusds.jwt.SignedJWT; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.keys.spi.PrivateKeyResolver; import org.eclipse.edc.spi.result.Result; import org.eclipse.edc.token.JwtGenerationService; diff --git a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGeneratorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGeneratorTest.java index e8171fb1b..634730328 100644 --- a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGeneratorTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/LdpPresentationGeneratorTest.java @@ -16,10 +16,10 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.nimbusds.jose.jwk.Curve; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry; import org.eclipse.edc.identityhub.spi.model.IdentityHubConstants; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.verification.SignatureSuiteRegistry; import org.eclipse.edc.jsonld.TitaniumJsonLd; import org.eclipse.edc.jsonld.util.JacksonJsonLd; import org.eclipse.edc.junit.testfixtures.TestUtils; diff --git a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationGeneratorTest.java b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationGeneratorTest.java index 9bc87aeec..159bb8607 100644 --- a/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationGeneratorTest.java +++ b/core/identity-hub-credentials/src/test/java/org/eclipse/edc/identityhub/core/creators/PresentationGeneratorTest.java @@ -18,9 +18,9 @@ import com.nimbusds.jose.jwk.Curve; import com.nimbusds.jose.jwk.ECKey; import com.nimbusds.jose.jwk.gen.ECKeyGenerator; -import org.eclipse.edc.identitytrust.model.CredentialSubject; -import org.eclipse.edc.identitytrust.model.Issuer; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; +import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/PresentationApiComponentTest.java b/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/PresentationApiComponentTest.java index 137012791..a37cca1bf 100644 --- a/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/PresentationApiComponentTest.java +++ b/e2e-tests/api-tests/src/test/java/org/eclipse/edc/identityhub/tests/PresentationApiComponentTest.java @@ -17,6 +17,9 @@ import com.nimbusds.jose.JOSEException; import jakarta.json.JsonObject; import org.eclipse.edc.iam.did.spi.resolution.DidPublicKeyResolver; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.InputDescriptorMapping; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationResponseMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationSubmission; import org.eclipse.edc.identityhub.junit.testfixtures.JwtCreationUtil; import org.eclipse.edc.identityhub.spi.ParticipantContextService; import org.eclipse.edc.identityhub.spi.generator.VerifiablePresentationService; @@ -27,9 +30,6 @@ import org.eclipse.edc.identityhub.spi.verification.AccessTokenVerifier; import org.eclipse.edc.identityhub.tests.fixtures.IdentityHubRuntimeConfiguration; import org.eclipse.edc.identityhub.tests.fixtures.TestData; -import org.eclipse.edc.identitytrust.model.credentialservice.InputDescriptorMapping; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationResponseMessage; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationSubmission; import org.eclipse.edc.junit.annotations.ComponentTest; import org.eclipse.edc.junit.extensions.EdcRuntimeExtension; import org.eclipse.edc.spi.result.Result; diff --git a/extensions/api/verifiable-credential-mgmt-api/src/test/java/org/eclipse/edc/identityhub/api/verifiablecredentials/v1/VerifiableCredentialsApiControllerTest.java b/extensions/api/verifiable-credential-mgmt-api/src/test/java/org/eclipse/edc/identityhub/api/verifiablecredentials/v1/VerifiableCredentialsApiControllerTest.java index 6ebe1c417..2c346b151 100644 --- a/extensions/api/verifiable-credential-mgmt-api/src/test/java/org/eclipse/edc/identityhub/api/verifiablecredentials/v1/VerifiableCredentialsApiControllerTest.java +++ b/extensions/api/verifiable-credential-mgmt-api/src/test/java/org/eclipse/edc/identityhub/api/verifiablecredentials/v1/VerifiableCredentialsApiControllerTest.java @@ -15,14 +15,14 @@ package org.eclipse.edc.identityhub.api.verifiablecredentials.v1; import io.restassured.specification.RequestSpecification; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; +import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.AuthorizationService; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.identityhub.spi.store.CredentialStore; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.CredentialSubject; -import org.eclipse.edc.identitytrust.model.Issuer; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.spi.result.ServiceResult; import org.eclipse.edc.spi.result.StoreResult; import org.eclipse.edc.web.jersey.testfixtures.RestControllerTestBase; diff --git a/extensions/store/sql/identity-hub-credentials-store-sql/src/main/java/org/eclipse/edc/identityhub/store/sql/credentials/SqlCredentialStore.java b/extensions/store/sql/identity-hub-credentials-store-sql/src/main/java/org/eclipse/edc/identityhub/store/sql/credentials/SqlCredentialStore.java index 90d8026c5..94b67c687 100644 --- a/extensions/store/sql/identity-hub-credentials-store-sql/src/main/java/org/eclipse/edc/identityhub/store/sql/credentials/SqlCredentialStore.java +++ b/extensions/store/sql/identity-hub-credentials-store-sql/src/main/java/org/eclipse/edc/identityhub/store/sql/credentials/SqlCredentialStore.java @@ -15,12 +15,12 @@ package org.eclipse.edc.identityhub.store.sql.credentials; import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.model.VcState; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.identityhub.spi.store.CredentialStore; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.policy.model.Policy; import org.eclipse.edc.spi.persistence.EdcPersistenceException; import org.eclipse.edc.spi.query.QuerySpec; diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreatorRegistry.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreatorRegistry.java index 8ba045970..a9b9d3e6f 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreatorRegistry.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/PresentationCreatorRegistry.java @@ -14,8 +14,9 @@ package org.eclipse.edc.identityhub.spi.generator; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; + +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import java.util.List; import java.util.Map; 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/PresentationGenerator.java index 37ac287f0..423dd404f 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/PresentationGenerator.java @@ -14,7 +14,8 @@ package org.eclipse.edc.identityhub.spi.generator; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; + +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import java.util.List; import java.util.Map; diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/VerifiablePresentationService.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/VerifiablePresentationService.java index 79e81041b..35fb4a345 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/VerifiablePresentationService.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/generator/VerifiablePresentationService.java @@ -14,9 +14,9 @@ package org.eclipse.edc.identityhub.spi.generator; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationResponseMessage; -import org.eclipse.edc.identitytrust.model.presentationdefinition.PresentationDefinition; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationResponseMessage; +import org.eclipse.edc.iam.identitytrust.spi.model.presentationdefinition.PresentationDefinition; import org.eclipse.edc.spi.result.Result; import org.jetbrains.annotations.Nullable; diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/IdentityHubConstants.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/IdentityHubConstants.java index 07a7e9a79..4ff1cfbb3 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/IdentityHubConstants.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/IdentityHubConstants.java @@ -14,7 +14,8 @@ package org.eclipse.edc.identityhub.spi.model; -import org.eclipse.edc.identitytrust.VcConstants; + +import org.eclipse.edc.iam.identitytrust.spi.VcConstants; public interface IdentityHubConstants extends VcConstants { } diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/VerifiableCredentialResource.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/VerifiableCredentialResource.java index afd930507..547cc473d 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/VerifiableCredentialResource.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/model/VerifiableCredentialResource.java @@ -15,7 +15,7 @@ package org.eclipse.edc.identityhub.spi.model; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.policy.model.Policy; /** @@ -60,6 +60,10 @@ protected Builder(VerifiableCredentialResource resource) { super(resource); } + public static Builder newInstance() { + return new Builder(new VerifiableCredentialResource()); + } + public Builder state(VcState state) { entity.state = state.code(); return self(); @@ -92,9 +96,5 @@ public VerifiableCredentialResource build() { } return super.build(); } - - public static Builder newInstance() { - return new Builder(new VerifiableCredentialResource()); - } } } diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/CredentialQueryResolver.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/CredentialQueryResolver.java index 0085a84d6..0a3658e09 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/CredentialQueryResolver.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/CredentialQueryResolver.java @@ -14,8 +14,9 @@ package org.eclipse.edc.identityhub.spi.resolution; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; -import org.eclipse.edc.identitytrust.model.credentialservice.PresentationQueryMessage; + +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.credentialservice.PresentationQueryMessage; import java.util.List; diff --git a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/QueryResult.java b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/QueryResult.java index 4cbbeea40..75b7aac69 100644 --- a/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/QueryResult.java +++ b/spi/identity-hub-spi/src/main/java/org/eclipse/edc/identityhub/spi/resolution/QueryResult.java @@ -14,7 +14,7 @@ package org.eclipse.edc.identityhub.spi.resolution; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.spi.result.AbstractResult; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -34,18 +34,6 @@ protected QueryResult(Stream content, QueryFailur super(content, failure); } - public QueryFailure.Reason reason() { - return getFailure().getReason(); - } - - @Override - protected , C1> @NotNull R1 newInstance(@Nullable C1 content, @Nullable QueryFailure failure) { - if (content instanceof Stream) { - return (R1) new QueryResult((Stream) content, failure); - } - return (R1) new QueryResult(null, failure); - } - /** * The query failed because no scope string was found */ @@ -81,4 +69,16 @@ public static QueryResult success(Stream credenti return new QueryResult(credentials, null); } + public QueryFailure.Reason reason() { + return getFailure().getReason(); + } + + @Override + protected , C1> @NotNull R1 newInstance(@Nullable C1 content, @Nullable QueryFailure failure) { + if (content instanceof Stream) { + return (R1) new QueryResult((Stream) content, failure); + } + return (R1) new QueryResult(null, failure); + } + } diff --git a/spi/identity-hub-store-spi/src/testFixtures/java/org/eclipse/edc/identityhub/store/test/CredentialStoreTestBase.java b/spi/identity-hub-store-spi/src/testFixtures/java/org/eclipse/edc/identityhub/store/test/CredentialStoreTestBase.java index 11fd7c81e..d5644c54c 100644 --- a/spi/identity-hub-store-spi/src/testFixtures/java/org/eclipse/edc/identityhub/store/test/CredentialStoreTestBase.java +++ b/spi/identity-hub-store-spi/src/testFixtures/java/org/eclipse/edc/identityhub/store/test/CredentialStoreTestBase.java @@ -15,15 +15,15 @@ package org.eclipse.edc.identityhub.store.test; import org.assertj.core.api.Assertions; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; +import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; +import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.model.ParticipantResource; import org.eclipse.edc.identityhub.spi.model.VcState; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.identityhub.spi.store.CredentialStore; -import org.eclipse.edc.identitytrust.model.CredentialFormat; -import org.eclipse.edc.identitytrust.model.CredentialSubject; -import org.eclipse.edc.identitytrust.model.Issuer; -import org.eclipse.edc.identitytrust.model.VerifiableCredential; -import org.eclipse.edc.identitytrust.model.VerifiableCredentialContainer; import org.eclipse.edc.spi.query.Criterion; import org.eclipse.edc.spi.query.QuerySpec; import org.jetbrains.annotations.NotNull;