diff --git a/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala index cef35227bb..f4d844dd54 100644 --- a/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/credentialdefinition/CredentialDefinitionLookupAndPaginationSpec.scala @@ -9,7 +9,7 @@ import org.hyperledger.identus.pollux.credentialdefinition.http.{ CredentialDefinitionResponsePage } import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} -import sttp.client3.{basicRequest, DeserializationException, Response, UriContext} +import sttp.client3.{basicRequest, Response, UriContext} import sttp.client3.ziojson.* import sttp.model.{StatusCode, Uri} import zio.* diff --git a/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala index 6ea8298c80..a348ae5254 100644 --- a/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala +++ b/cloud-agent/service/server/src/test/scala/org/hyperledger/identus/pollux/schema/CredentialSchemaLookupAndPaginationSpec.scala @@ -12,7 +12,7 @@ import org.hyperledger.identus.pollux.credentialschema.http.{ CredentialSchemaResponsePage } import org.hyperledger.identus.shared.models.{WalletAccessContext, WalletId} -import sttp.client3.{basicRequest, DeserializationException, Response, UriContext} +import sttp.client3.{basicRequest, Response, UriContext} import sttp.client3.ziojson.* import sttp.model.{StatusCode, Uri} import zio.* diff --git a/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala index e9f740ac04..5eb2d4614c 100644 --- a/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala +++ b/cloud-agent/service/wallet-api/src/main/scala/org/hyperledger/identus/agent/walletapi/util/OperationFactory.scala @@ -5,11 +5,9 @@ import org.hyperledger.identus.agent.walletapi.model.error.{CreateManagedDIDErro import org.hyperledger.identus.castor.core.model.did.* import org.hyperledger.identus.shared.crypto.{ Apollo, - Ed25519KeyPair, Ed25519PublicKey, Secp256k1KeyPair, Secp256k1PublicKey, - X25519KeyPair, X25519PublicKey } import org.hyperledger.identus.shared.models.Base64UrlString diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/SdJwtPresentationPayload.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/SdJwtPresentationPayload.scala index 5b67a8c27d..ea834776f1 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/SdJwtPresentationPayload.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/model/presentation/SdJwtPresentationPayload.scala @@ -1,6 +1,5 @@ package org.hyperledger.identus.pollux.core.model.presentation -import org.hyperledger.identus.pollux.core.model.presentation.Options import org.hyperledger.identus.pollux.sdjwt.PresentationJson import zio.json.* diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala index 95322d979f..f0301fb141 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/CredentialServiceImpl.scala @@ -6,12 +6,7 @@ import io.circe.Json import org.hyperledger.identus.agent.walletapi.model.{ManagedDIDState, PublicationState} import org.hyperledger.identus.agent.walletapi.service.ManagedDIDService import org.hyperledger.identus.agent.walletapi.storage.GenericSecretStorage -import org.hyperledger.identus.castor.core.model.did.{ - CanonicalPrismDID, - EllipticCurve, - PrismDID, - VerificationRelationship -} +import org.hyperledger.identus.castor.core.model.did.{CanonicalPrismDID, PrismDID, VerificationRelationship} import org.hyperledger.identus.castor.core.service.DIDService import org.hyperledger.identus.mercury.model.* import org.hyperledger.identus.mercury.protocol.issuecredential.* diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala index 79ecf9d689..1866cf7dd5 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/MockPresentationService.scala @@ -12,7 +12,6 @@ import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord} import org.hyperledger.identus.pollux.core.model.error.PresentationError import org.hyperledger.identus.pollux.core.model.presentation.{Options, SdJwtPresentationPayload} import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import org.hyperledger.identus.pollux.sdjwt.PresentationJson import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{mock, IO, URLayer, ZIO, ZLayer} diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala index de8fc87ffa..8231795fe5 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationService.scala @@ -7,7 +7,6 @@ import org.hyperledger.identus.pollux.core.model.* import org.hyperledger.identus.pollux.core.model.error.PresentationError import org.hyperledger.identus.pollux.core.model.presentation.* import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import org.hyperledger.identus.pollux.sdjwt.PresentationJson import org.hyperledger.identus.pollux.vc.jwt.* import org.hyperledger.identus.shared.models.WalletAccessContext import zio.* diff --git a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala index b1c9a1ae8e..d6cb828be4 100644 --- a/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala +++ b/pollux/core/src/main/scala/org/hyperledger/identus/pollux/core/service/PresentationServiceNotifier.scala @@ -13,7 +13,6 @@ import org.hyperledger.identus.pollux.core.model.{DidCommID, PresentationRecord} import org.hyperledger.identus.pollux.core.model.error.PresentationError import org.hyperledger.identus.pollux.core.model.presentation.{Options, SdJwtPresentationPayload} import org.hyperledger.identus.pollux.core.service.serdes.{AnoncredCredentialProofsV1, AnoncredPresentationRequestV1} -import org.hyperledger.identus.pollux.sdjwt.PresentationJson import org.hyperledger.identus.pollux.vc.jwt.{Issuer, PresentationPayload, W3cCredentialPayload} import org.hyperledger.identus.shared.models.WalletAccessContext import zio.{IO, URLayer, ZIO, ZLayer} diff --git a/pollux/sd-jwt/src/test/scala/org/hyperledger/identus/pollux/sdjwt/SDJWTSpec.scala b/pollux/sd-jwt/src/test/scala/org/hyperledger/identus/pollux/sdjwt/SDJWTSpec.scala index a17b07a5ad..b94dc96403 100644 --- a/pollux/sd-jwt/src/test/scala/org/hyperledger/identus/pollux/sdjwt/SDJWTSpec.scala +++ b/pollux/sd-jwt/src/test/scala/org/hyperledger/identus/pollux/sdjwt/SDJWTSpec.scala @@ -280,7 +280,7 @@ object SDJWTSpec extends ZIOSpecDefault { test("get iss field from PresentationJson") { val ed25519KeyPair = KmpEd25519KeyOps.generateKeyPair val issuerKey = IssuerPrivateKey(ed25519KeyPair.privateKey) - val issuerPublicKey = IssuerPublicKey(ed25519KeyPair.publicKey) + IssuerPublicKey(ed25519KeyPair.publicKey) val credential = SDJWT.issueCredential(issuerKey, CLAIMS) val presentation = SDJWT.createPresentation(credential, CLAIMS_PRESENTED) diff --git a/pollux/vc-jwt/src/main/scala/org/hyperledger/identus/pollux/vc/jwt/JWTVerification.scala b/pollux/vc-jwt/src/main/scala/org/hyperledger/identus/pollux/vc/jwt/JWTVerification.scala index e0080ecb0a..2ffb16eab6 100644 --- a/pollux/vc-jwt/src/main/scala/org/hyperledger/identus/pollux/vc/jwt/JWTVerification.scala +++ b/pollux/vc-jwt/src/main/scala/org/hyperledger/identus/pollux/vc/jwt/JWTVerification.scala @@ -8,18 +8,14 @@ import com.nimbusds.jose.JWSVerifier import com.nimbusds.jwt.SignedJWT import io.circe import io.circe.generic.auto.* -import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo -import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters -import org.bouncycastle.crypto.util.SubjectPublicKeyInfoFactory import org.hyperledger.identus.castor.core.model.did.VerificationRelationship import org.hyperledger.identus.shared.crypto.Ed25519PublicKey import pdi.jwt.* import zio.* import zio.prelude.* -import java.security.{KeyFactory, PublicKey} import java.security.interfaces.{ECPublicKey, EdECPublicKey} -import java.security.spec.X509EncodedKeySpec +import java.security.PublicKey import scala.util.{Failure, Success, Try} object JWTVerification {