From f46ce75e262a3eb331860a329b63dca34410ac74 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 14 Dec 2023 14:53:28 +0100 Subject: [PATCH] restructure --- services/pom.xml | 2 +- .../OIDC4VPAbstractWellKnownProvider.java | 20 +++++----- .../{oid4vp => oid4vc}/OIDC4VPClient.java | 4 +- .../OIDC4VPClientModel.java | 2 +- .../OIDC4VPClientRegistrationContext.java | 2 +- .../OIDC4VPClientRegistrationProvider.java | 2 +- ...C4VPClientRegistrationProviderFactory.java | 2 +- .../OIDC4VPLoginProtocol.java | 2 +- .../OIDC4VPLoginProtocolFactory.java | 12 +++--- .../issuance}/OIDC4VPIssuerEndpoint.java | 37 ++++++++++--------- .../OIDC4VPIssuerWellKnownProvider.java | 5 ++- ...OIDC4VPIssuerWellKnownProviderFactory.java | 2 +- .../issuance}/OIDC4VPWellKnownProvider.java | 9 +++-- .../OIDC4VPWellKnownProviderFactory.java | 2 +- .../issuance}/VCIssuerException.java | 2 +- .../issuance}/mappers/OIDC4VPMapper.java | 6 +-- .../mappers/OIDC4VPMapperException.java | 2 +- .../mappers/OIDC4VPMapperFactory.java | 2 +- .../mappers/OIDC4VPStaticClaimMapper.java | 6 +-- .../mappers/OIDC4VPSubjectIdMapper.java | 6 +-- .../mappers/OIDC4VPTargetRoleMapper.java | 8 ++-- .../issuance}/mappers/OIDC4VPTypeMapper.java | 6 +-- .../mappers/OIDC4VPUserAttributeMapper.java | 6 +-- .../issuance}/signing/FileBasedKeyLoader.java | 2 +- .../issuance}/signing/JwtSigningService.java | 8 ++-- .../issuance}/signing/KeyLoader.java | 2 +- .../issuance}/signing/LDSigningService.java | 12 +++--- .../signing/SdJwtSigningService.java | 8 ++-- .../issuance}/signing/SigningService.java | 2 +- .../signing/SigningServiceException.java | 2 +- .../issuance}/signing/VCSigningService.java | 4 +- .../jwt_vc/EdDSASignatureSignerContext.java | 2 +- .../signing/vcdm/Ed255192018Suite.java | 6 +-- .../signing/vcdm/LDSignatureType.java | 2 +- .../signing/vcdm/RsaSignature2018Suite.java | 4 +- .../issuance}/signing/vcdm/SecuritySuite.java | 4 +- .../model/CredentialSubject.java | 2 +- .../{oid4vp => oid4vc}/model/ErrorType.java | 2 +- .../{oid4vp => oid4vc}/model/Role.java | 2 +- .../model/VerifiableCredential.java | 4 +- .../model/sd_jwt_vc/ArrayDigest.java | 2 +- .../model/sd_jwt_vc/ArrayDisclosureClaim.java | 2 +- .../model/sd_jwt_vc/ArrayElement.java | 2 +- .../model/sd_jwt_vc/DisclosureClaim.java | 2 +- .../model/sd_jwt_vc/SdClaim.java | 4 +- .../model/sd_jwt_vc/SdCredential.java | 2 +- .../model/vcdm/LdProof.java | 2 +- .../oidc/endpoints/TokenEndpoint.java | 2 +- ...org.keycloak.protocol.LoginProtocolFactory | 2 +- .../org.keycloak.protocol.ProtocolMapper | 8 ++-- ...stration.ClientRegistrationProviderFactory | 2 +- ...eycloak.wellknown.WellKnownProviderFactory | 4 +- ...OIDC4VPClientRegistrationProviderTest.java | 7 +++- .../issuance}/ExpectedResult.java | 2 +- .../issuance}/OIDC4VPIssuerEndpointTest.java | 14 ++++--- .../signing/JwtSigningServiceTest.java | 2 +- .../signing/LDSigningServiceTest.java | 10 +++-- .../signing/SdJwtSigningServiceTest.java | 2 +- .../issuance}/signing/SigningServiceTest.java | 6 +-- 59 files changed, 153 insertions(+), 139 deletions(-) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPAbstractWellKnownProvider.java (77%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClient.java (96%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClientModel.java (82%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClientRegistrationContext.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClientRegistrationProvider.java (99%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClientRegistrationProviderFactory.java (97%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPLoginProtocol.java (98%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPLoginProtocolFactory.java (92%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPIssuerEndpoint.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPIssuerWellKnownProvider.java (79%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPIssuerWellKnownProviderFactory.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPWellKnownProvider.java (87%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPWellKnownProviderFactory.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/VCIssuerException.java (82%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPMapper.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPMapperException.java (80%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPMapperFactory.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPStaticClaimMapper.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPSubjectIdMapper.java (92%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPTargetRoleMapper.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPTypeMapper.java (93%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/mappers/OIDC4VPUserAttributeMapper.java (96%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/FileBasedKeyLoader.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/JwtSigningService.java (96%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/KeyLoader.java (54%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/LDSigningService.java (86%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/SdJwtSigningService.java (97%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/SigningService.java (93%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/SigningServiceException.java (83%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/VCSigningService.java (50%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/jwt_vc/EdDSASignatureSignerContext.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/vcdm/Ed255192018Suite.java (96%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/vcdm/LDSignatureType.java (93%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/vcdm/RsaSignature2018Suite.java (88%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/vcdm/SecuritySuite.java (65%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/CredentialSubject.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/ErrorType.java (91%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/Role.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/VerifiableCredential.java (95%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/ArrayDigest.java (87%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/ArrayDisclosureClaim.java (92%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/ArrayElement.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/DisclosureClaim.java (94%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/SdClaim.java (84%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/sd_jwt_vc/SdCredential.java (89%) rename services/src/main/java/org/keycloak/protocol/{oid4vp => oid4vc}/model/vcdm/LdProof.java (97%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc}/OIDC4VPClientRegistrationProviderTest.java (96%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/ExpectedResult.java (98%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/OIDC4VPIssuerEndpointTest.java (99%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/JwtSigningServiceTest.java (96%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/LDSigningServiceTest.java (90%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/SdJwtSigningServiceTest.java (97%) rename services/src/test/java/org/keycloak/protocol/{oid4vp => oid4vc/issuance}/signing/SigningServiceTest.java (92%) diff --git a/services/pom.xml b/services/pom.xml index 0185de857528..8cff94e9db07 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -270,7 +270,7 @@ ${project.basedir}/src/api/oidc4vci-api.yaml true - org.keycloak.protocol.oid4vp.model + org.keycloak.protocol.oid4vc.model true jaxrs-spec diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPAbstractWellKnownProvider.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPAbstractWellKnownProvider.java similarity index 77% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPAbstractWellKnownProvider.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPAbstractWellKnownProvider.java index 862dd9530e2e..ad73af20e535 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPAbstractWellKnownProvider.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPAbstractWellKnownProvider.java @@ -1,11 +1,11 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.ws.rs.core.UriInfo; import org.keycloak.models.KeycloakContext; import org.keycloak.models.KeycloakSession; -import org.keycloak.protocol.oid4vp.model.Format; -import org.keycloak.protocol.oid4vp.model.SupportedCredential; +import org.keycloak.protocol.oid4vc.model.Format; +import org.keycloak.protocol.oid4vc.model.SupportedCredential; import org.keycloak.services.Urls; import org.keycloak.urls.UrlType; import org.keycloak.wellknown.WellKnownProvider; @@ -16,7 +16,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; +import static org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; public abstract class OIDC4VPAbstractWellKnownProvider implements WellKnownProvider { @@ -39,7 +39,7 @@ public static List getSupportedCredentials(KeycloakContext } - protected List mapAttributeEntryToSc(Map.Entry typesEntry) { + public List mapAttributeEntryToSc(Map.Entry typesEntry) { String type = typesEntry.getKey().replaceFirst(VC_TYPES_PREFIX, ""); Set supportedFormats = getFormatsFromString(typesEntry.getValue()); return supportedFormats.stream().map(formatVO -> { @@ -51,7 +51,7 @@ protected List mapAttributeEntryToSc(Map.Entry mapAttributeEntryToScVO(Map.Entry typesEntry) { + public static List mapAttributeEntryToScVO(Map.Entry typesEntry) { String type = typesEntry.getKey().replaceFirst(VC_TYPES_PREFIX, ""); Set supportedFormats = getFormatsFromString(typesEntry.getValue()); return supportedFormats.stream().map(formatVO -> { @@ -66,15 +66,15 @@ protected static List mapAttributeEntryToScVO(Map.Entry getFormatsFromString(String formatString) { + public static Set getFormatsFromString(String formatString) { return Arrays.stream(formatString.split(",")).map(Format::fromString).collect(Collectors.toSet()); } - protected static String buildIdFromType(Format formatVO, String type) { + public static String buildIdFromType(Format formatVO, String type) { return String.format("%s_%s", type, formatVO.toString()); } - protected static String getIssuer(KeycloakContext context) { + public static String getIssuer(KeycloakContext context) { UriInfo frontendUriInfo = context.getUri(UrlType.FRONTEND); return Urls.realmIssuer(frontendUriInfo.getBaseUri(), @@ -82,7 +82,7 @@ protected static String getIssuer(KeycloakContext context) { } - protected static String getCredentialsEndpoint(KeycloakContext context) { + public static String getCredentialsEndpoint(KeycloakContext context) { return getIssuer(context) + "/protocol/" + OIDC4VPLoginProtocolFactory.PROTOCOL_ID + "/credential"; } } diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClient.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClient.java similarity index 96% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClient.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClient.java index a46b05cf8972..83d2ba7f7bbc 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClient.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClient.java @@ -1,6 +1,6 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; -import org.keycloak.protocol.oid4vp.model.SupportedCredential; +import org.keycloak.protocol.oid4vc.model.SupportedCredential; import java.util.List; import java.util.Map; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientModel.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientModel.java similarity index 82% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientModel.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientModel.java index 27d4b729b8ad..0ae476899293 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientModel.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientModel.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import org.keycloak.models.ClientModel; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationContext.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationContext.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationContext.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationContext.java index 2c328cb23959..d4600dcbf7c4 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationContext.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationContext.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import org.keycloak.models.KeycloakSession; import org.keycloak.representations.idm.ClientRepresentation; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProvider.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProvider.java similarity index 99% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProvider.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProvider.java index 19022652b614..fe7ae8788b87 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProvider.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderFactory.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderFactory.java similarity index 97% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderFactory.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderFactory.java index 1ad95ddff3b1..a23c2d5794b6 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocol.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocol.java similarity index 98% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocol.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocol.java index 1665a08db4ba..2d67a749d5dc 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocol.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocol.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocolFactory.java b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocolFactory.java similarity index 92% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocolFactory.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocolFactory.java index c8e4dcf24ff8..350e8525a12a 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPLoginProtocolFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/OIDC4VPLoginProtocolFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import com.fasterxml.jackson.databind.ObjectMapper; import org.jboss.logging.Logger; @@ -13,9 +13,11 @@ import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.protocol.LoginProtocol; import org.keycloak.protocol.LoginProtocolFactory; -import org.keycloak.protocol.oid4vp.mappers.OIDC4VPSubjectIdMapper; -import org.keycloak.protocol.oid4vp.mappers.OIDC4VPTargetRoleMapper; -import org.keycloak.protocol.oid4vp.mappers.OIDC4VPUserAttributeMapper; +import org.keycloak.protocol.oid4vc.issuance.OIDC4VPIssuerEndpoint; +import org.keycloak.protocol.oid4vc.issuance.VCIssuerException; +import org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPSubjectIdMapper; +import org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPTargetRoleMapper; +import org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPUserAttributeMapper; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.services.managers.AppAuthManager; @@ -49,7 +51,7 @@ public class OIDC4VPLoginProtocolFactory implements LoginProtocolFactory { @Override public void init(Config.Scope config) { - LOGGER.info("Initiate the protocol factory"); + LOGGER.infof("Initiate the protocol factory. Config is %s", config); builtins.put(CLIENT_ROLES_MAPPER, OIDC4VPTargetRoleMapper.create("id", "client roles")); builtins.put(SUBJECT_ID_MAPPER, diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpoint.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpoint.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpoint.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpoint.java index 5de9572655fb..ecb47a06d2b6 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpoint.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -12,22 +12,25 @@ import org.keycloak.common.util.Time; import org.keycloak.events.EventBuilder; import org.keycloak.models.*; +import org.keycloak.protocol.oid4vc.OIDC4VPAbstractWellKnownProvider; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProvider; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; import org.keycloak.protocol.oidc.utils.OAuth2Code; import org.keycloak.protocol.oidc.utils.OAuth2CodeParser; -import org.keycloak.protocol.oid4vp.mappers.OIDC4VPMapper; -import org.keycloak.protocol.oid4vp.mappers.OIDC4VPMapperFactory; -import org.keycloak.protocol.oid4vp.model.*; -import org.keycloak.protocol.oid4vp.model.CredentialOfferURI; -import org.keycloak.protocol.oid4vp.model.CredentialRequest; -import org.keycloak.protocol.oid4vp.model.CredentialResponse; -import org.keycloak.protocol.oid4vp.model.CredentialsOffer; -import org.keycloak.protocol.oid4vp.model.ErrorResponse; -import org.keycloak.protocol.oid4vp.model.Format; -import org.keycloak.protocol.oid4vp.model.PreAuthorized; -import org.keycloak.protocol.oid4vp.model.PreAuthorizedGrant; -import org.keycloak.protocol.oid4vp.model.SupportedCredential; -import org.keycloak.protocol.oid4vp.model.vcdm.LdProof; -import org.keycloak.protocol.oid4vp.signing.*; +import org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPMapper; +import org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPMapperFactory; +import org.keycloak.protocol.oid4vc.model.*; +import org.keycloak.protocol.oid4vc.model.CredentialOfferURI; +import org.keycloak.protocol.oid4vc.model.CredentialRequest; +import org.keycloak.protocol.oid4vc.model.CredentialResponse; +import org.keycloak.protocol.oid4vc.model.CredentialsOffer; +import org.keycloak.protocol.oid4vc.model.ErrorResponse; +import org.keycloak.protocol.oid4vc.model.Format; +import org.keycloak.protocol.oid4vc.model.PreAuthorized; +import org.keycloak.protocol.oid4vc.model.PreAuthorizedGrant; +import org.keycloak.protocol.oid4vc.model.SupportedCredential; +import org.keycloak.protocol.oid4vc.model.vcdm.LdProof; +import org.keycloak.protocol.oid4vc.signing.*; import org.keycloak.representations.JsonWebToken; import org.keycloak.services.managers.AppAuthManager; import org.keycloak.services.managers.AuthenticationManager; @@ -37,8 +40,8 @@ import java.util.*; import java.util.stream.Collectors; -import static org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; -import static org.keycloak.protocol.oid4vp.model.Format.*; +import static org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; +import static org.keycloak.protocol.oid4vc.model.Format.*; /** * Realm-Resource to provide functionality for issuing VerifiableCredentials to users, depending on their roles in diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProvider.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProvider.java similarity index 79% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProvider.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProvider.java index 35133d42fe83..a7f5a078a52a 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProvider.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProvider.java @@ -1,8 +1,9 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.databind.ObjectMapper; import org.keycloak.models.KeycloakSession; -import org.keycloak.protocol.oid4vp.model.CredentialIssuer; +import org.keycloak.protocol.oid4vc.OIDC4VPAbstractWellKnownProvider; +import org.keycloak.protocol.oid4vc.model.CredentialIssuer; public class OIDC4VPIssuerWellKnownProvider extends OIDC4VPAbstractWellKnownProvider { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProviderFactory.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProviderFactory.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProviderFactory.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProviderFactory.java index b83e3dccbc4a..5b9567b5d68b 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerWellKnownProviderFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerWellKnownProviderFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.databind.ObjectMapper; import org.jboss.logging.Logger; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProvider.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProvider.java similarity index 87% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProvider.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProvider.java index 9a1e6d4744fa..a8fc4db1d6be 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProvider.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProvider.java @@ -1,11 +1,12 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; +import org.keycloak.protocol.oid4vc.OIDC4VPAbstractWellKnownProvider; import org.keycloak.protocol.oidc.OIDCWellKnownProvider; -import org.keycloak.protocol.oid4vp.model.SupportedCredential; +import org.keycloak.protocol.oid4vc.model.SupportedCredential; import java.util.ArrayList; import java.util.List; @@ -14,8 +15,8 @@ import java.util.Optional; import java.util.stream.Collectors; -import static org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; -import static org.keycloak.protocol.oid4vp.OIDC4VPIssuerEndpoint.GRANT_TYPE_PRE_AUTHORIZED_CODE; +import static org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProvider.VC_TYPES_PREFIX; +import static org.keycloak.protocol.oid4vc.issuance.OIDC4VPIssuerEndpoint.GRANT_TYPE_PRE_AUTHORIZED_CODE; public class OIDC4VPWellKnownProvider extends OIDC4VPAbstractWellKnownProvider { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProviderFactory.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProviderFactory.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProviderFactory.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProviderFactory.java index e98351b6915a..c785ef60b96b 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/OIDC4VPWellKnownProviderFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPWellKnownProviderFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.databind.ObjectMapper; import org.jboss.logging.Logger; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/VCIssuerException.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/VCIssuerException.java similarity index 82% rename from services/src/main/java/org/keycloak/protocol/oid4vp/VCIssuerException.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/VCIssuerException.java index e1a59972af8b..86be30b4cc74 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/VCIssuerException.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/VCIssuerException.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; public class VCIssuerException extends RuntimeException { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapper.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapper.java index 3ab24139ced9..83b4504def73 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapper.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; @@ -6,8 +6,8 @@ import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.UserSessionModel; import org.keycloak.protocol.ProtocolMapper; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.*; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperException.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperException.java similarity index 80% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperException.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperException.java index 5ace0de77580..91b14c8e6f67 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperException.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperException.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; public class OIDC4VPMapperException extends RuntimeException { public OIDC4VPMapperException(String message) { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperFactory.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperFactory.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperFactory.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperFactory.java index 2a8ee5a63566..6d66d82b3eef 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPMapperFactory.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPMapperFactory.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.models.ProtocolMapperModel; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPStaticClaimMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPStaticClaimMapper.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPStaticClaimMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPStaticClaimMapper.java index 1ebaf06eaa73..36993b2cff07 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPStaticClaimMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPStaticClaimMapper.java @@ -1,9 +1,9 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.ArrayList; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPSubjectIdMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPSubjectIdMapper.java similarity index 92% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPSubjectIdMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPSubjectIdMapper.java index e0f469717f66..c0c48ea12a87 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPSubjectIdMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPSubjectIdMapper.java @@ -1,9 +1,9 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.ArrayList; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTargetRoleMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTargetRoleMapper.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTargetRoleMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTargetRoleMapper.java index 5bd459e16c87..b3d056208ba6 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTargetRoleMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTargetRoleMapper.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.validation.constraints.NotNull; @@ -7,9 +7,9 @@ import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.Role; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.Role; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.*; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTypeMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTypeMapper.java similarity index 93% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTypeMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTypeMapper.java index b021c3b4384b..23de49f8ae43 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPTypeMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPTypeMapper.java @@ -1,9 +1,9 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.*; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPUserAttributeMapper.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPUserAttributeMapper.java similarity index 96% rename from services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPUserAttributeMapper.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPUserAttributeMapper.java index f12c976cca74..feca26444e63 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/mappers/OIDC4VPUserAttributeMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/mappers/OIDC4VPUserAttributeMapper.java @@ -1,11 +1,11 @@ -package org.keycloak.protocol.oid4vp.mappers; +package org.keycloak.protocol.oid4vc.issuance.mappers; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.KeycloakModelUtils; -import org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import org.keycloak.provider.ProviderConfigProperty; import java.util.ArrayList; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/FileBasedKeyLoader.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/FileBasedKeyLoader.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/FileBasedKeyLoader.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/FileBasedKeyLoader.java index 29dbe6553dd2..4dd4ae4ca035 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/FileBasedKeyLoader.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/FileBasedKeyLoader.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; import org.jboss.logging.Logger; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/JwtSigningService.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningService.java similarity index 96% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/JwtSigningService.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningService.java index c27a5d86aec5..e14ffa044e07 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/JwtSigningService.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningService.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; @@ -8,8 +8,8 @@ import org.keycloak.common.util.KeyUtils; import org.keycloak.crypto.*; import org.keycloak.jose.jws.JWSBuilder; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; -import org.keycloak.protocol.oid4vp.signing.jwt_vc.EdDSASignatureSignerContext; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.signing.jwt_vc.EdDSASignatureSignerContext; import org.keycloak.representations.JsonWebToken; import java.io.IOException; @@ -25,7 +25,7 @@ import java.util.Optional; import java.util.UUID; -import static org.keycloak.protocol.oid4vp.signing.jwt_vc.EdDSASignatureSignerContext.ED_25519; +import static org.keycloak.protocol.oid4vc.signing.jwt_vc.EdDSASignatureSignerContext.ED_25519; public class JwtSigningService extends SigningService { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/KeyLoader.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/KeyLoader.java similarity index 54% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/KeyLoader.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/KeyLoader.java index a17de8e6844f..2197cbf289bb 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/KeyLoader.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/KeyLoader.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; public interface KeyLoader { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/LDSigningService.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningService.java similarity index 86% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/LDSigningService.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningService.java index dc9e90230b3b..11a2b60eed11 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/LDSigningService.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningService.java @@ -1,14 +1,14 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; import com.fasterxml.jackson.databind.ObjectMapper; import org.jboss.logging.Logger; import org.keycloak.common.util.Base64; -import org.keycloak.protocol.oid4vp.model.vcdm.LdProof; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; -import org.keycloak.protocol.oid4vp.signing.vcdm.Ed255192018Suite; -import org.keycloak.protocol.oid4vp.signing.vcdm.RsaSignature2018Suite; -import org.keycloak.protocol.oid4vp.signing.vcdm.SecuritySuite; +import org.keycloak.protocol.oid4vc.model.vcdm.LdProof; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.signing.vcdm.Ed255192018Suite; +import org.keycloak.protocol.oid4vc.signing.vcdm.RsaSignature2018Suite; +import org.keycloak.protocol.oid4vc.signing.vcdm.SecuritySuite; import java.io.IOException; import java.time.Clock; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningService.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningService.java similarity index 97% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningService.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningService.java index 0eec9992d915..af18785f7a73 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningService.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningService.java @@ -1,13 +1,13 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.keycloak.crypto.HashProvider; import org.keycloak.crypto.JavaAlgorithm; import org.keycloak.crypto.JavaAlgorithmHashProvider; -import org.keycloak.protocol.oid4vp.model.CredentialSubject; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; -import org.keycloak.protocol.oid4vp.model.sd_jwt_vc.*; +import org.keycloak.protocol.oid4vc.model.CredentialSubject; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.model.sd_jwt_vc.*; import org.keycloak.representations.JsonWebToken; import java.nio.charset.StandardCharsets; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningService.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningService.java similarity index 93% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningService.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningService.java index f4ad153d2450..920f457d3a83 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningService.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningService.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; import java.time.Clock; import java.util.Optional; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningServiceException.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceException.java similarity index 83% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningServiceException.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceException.java index eedccf00b6c1..1efdfcac821d 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/SigningServiceException.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceException.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; public class SigningServiceException extends RuntimeException{ diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/VCSigningService.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/VCSigningService.java similarity index 50% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/VCSigningService.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/VCSigningService.java index 8d28753344d9..ae4f2ff59572 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/VCSigningService.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/VCSigningService.java @@ -1,7 +1,7 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.signing; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; public interface VCSigningService { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/jwt_vc/EdDSASignatureSignerContext.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/jwt_vc/EdDSASignatureSignerContext.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/jwt_vc/EdDSASignatureSignerContext.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/jwt_vc/EdDSASignatureSignerContext.java index c3cf2e97b6bb..e60c942dfc5a 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/jwt_vc/EdDSASignatureSignerContext.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/jwt_vc/EdDSASignatureSignerContext.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing.jwt_vc; +package org.keycloak.protocol.oid4vc.signing.jwt_vc; import org.keycloak.crypto.KeyWrapper; import org.keycloak.crypto.SignatureException; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/Ed255192018Suite.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/Ed255192018Suite.java similarity index 96% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/Ed255192018Suite.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/Ed255192018Suite.java index 91246bae94cf..ac53134690c9 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/Ed255192018Suite.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/Ed255192018Suite.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing.vcdm; +package org.keycloak.protocol.oid4vc.signing.vcdm; import com.apicatalog.jsonld.JsonLd; import com.apicatalog.jsonld.JsonLdError; @@ -23,8 +23,8 @@ import org.bouncycastle.crypto.util.PrivateKeyFactory; import org.bouncycastle.openssl.PEMKeyPair; import org.bouncycastle.openssl.PEMParser; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; -import org.keycloak.protocol.oid4vp.signing.SigningServiceException; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.signing.SigningServiceException; import java.io.IOException; import java.io.StringReader; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/LDSignatureType.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/LDSignatureType.java similarity index 93% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/LDSignatureType.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/LDSignatureType.java index 3f8ad7e3e787..147d37a228ce 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/LDSignatureType.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/LDSignatureType.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing.vcdm; +package org.keycloak.protocol.oid4vc.signing.vcdm; public enum LDSignatureType { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/RsaSignature2018Suite.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/RsaSignature2018Suite.java similarity index 88% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/RsaSignature2018Suite.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/RsaSignature2018Suite.java index bd3feaf9a035..659cd330f8b0 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/RsaSignature2018Suite.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/RsaSignature2018Suite.java @@ -1,6 +1,6 @@ -package org.keycloak.protocol.oid4vp.signing.vcdm; +package org.keycloak.protocol.oid4vc.signing.vcdm; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; public class RsaSignature2018Suite implements SecuritySuite { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/SecuritySuite.java b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/SecuritySuite.java similarity index 65% rename from services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/SecuritySuite.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/SecuritySuite.java index e5724cfb9e49..987e70a2ca4d 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/signing/vcdm/SecuritySuite.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/issuance/signing/vcdm/SecuritySuite.java @@ -1,6 +1,6 @@ -package org.keycloak.protocol.oid4vp.signing.vcdm; +package org.keycloak.protocol.oid4vc.signing.vcdm; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; public interface SecuritySuite { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/CredentialSubject.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/CredentialSubject.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/CredentialSubject.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/CredentialSubject.java index 542a44ff3066..1d806c85534c 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/CredentialSubject.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/CredentialSubject.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model; +package org.keycloak.protocol.oid4vc.model; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/ErrorType.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/ErrorType.java similarity index 91% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/ErrorType.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/ErrorType.java index d6ff1a5996e0..b6f849272cb6 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/ErrorType.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/ErrorType.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model; +package org.keycloak.protocol.oid4vc.model; public enum ErrorType { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/Role.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/Role.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/Role.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/Role.java index 806431f3006d..041ea10cbe0e 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/Role.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/Role.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model; +package org.keycloak.protocol.oid4vc.model; import java.util.Objects; import java.util.Set; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/VerifiableCredential.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/VerifiableCredential.java similarity index 95% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/VerifiableCredential.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/VerifiableCredential.java index 8ed703827c41..5be57b318883 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/VerifiableCredential.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/VerifiableCredential.java @@ -1,7 +1,7 @@ -package org.keycloak.protocol.oid4vp.model; +package org.keycloak.protocol.oid4vc.model; import com.fasterxml.jackson.annotation.*; -import org.keycloak.protocol.oid4vp.model.vcdm.LdProof; +import org.keycloak.protocol.oid4vc.model.vcdm.LdProof; import java.net.URI; import java.util.Date; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDigest.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDigest.java similarity index 87% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDigest.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDigest.java index 12d82c3efb04..5a835a661151 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDigest.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDigest.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDisclosureClaim.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDisclosureClaim.java similarity index 92% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDisclosureClaim.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDisclosureClaim.java index 261c8ca27263..6dd9a7ad8375 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayDisclosureClaim.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayDisclosureClaim.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; import java.util.ArrayList; import java.util.List; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayElement.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayElement.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayElement.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayElement.java index 8bf65b186759..dd6cfd04326e 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/ArrayElement.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/ArrayElement.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; public class ArrayElement { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/DisclosureClaim.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/DisclosureClaim.java similarity index 94% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/DisclosureClaim.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/DisclosureClaim.java index e2e01838763d..781a9d417142 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/DisclosureClaim.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/DisclosureClaim.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; public class DisclosureClaim { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdClaim.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdClaim.java similarity index 84% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdClaim.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdClaim.java index f1dfd20707a9..e58357bccbaa 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdClaim.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdClaim.java @@ -1,6 +1,6 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; -import static org.keycloak.protocol.oid4vp.signing.SdJwtSigningService.generateSalt; +import static org.keycloak.protocol.oid4vc.signing.SdJwtSigningService.generateSalt; public class SdClaim { diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdCredential.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdCredential.java similarity index 89% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdCredential.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdCredential.java index 214e354a7f98..a0d688043112 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/sd_jwt_vc/SdCredential.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/sd_jwt_vc/SdCredential.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.sd_jwt_vc; +package org.keycloak.protocol.oid4vc.model.sd_jwt_vc; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/services/src/main/java/org/keycloak/protocol/oid4vp/model/vcdm/LdProof.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/vcdm/LdProof.java similarity index 97% rename from services/src/main/java/org/keycloak/protocol/oid4vp/model/vcdm/LdProof.java rename to services/src/main/java/org/keycloak/protocol/oid4vc/model/vcdm/LdProof.java index 86c59d027176..06a858bce577 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vp/model/vcdm/LdProof.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/vcdm/LdProof.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.model.vcdm; +package org.keycloak.protocol.oid4vc.model.vcdm; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java index 3d90b6cf81a0..4953c0dc3332 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java @@ -125,7 +125,7 @@ import java.util.function.Supplier; import java.util.stream.Stream; -import static org.keycloak.protocol.oid4vp.OIDC4VPIssuerEndpoint.GRANT_TYPE_PRE_AUTHORIZED_CODE; +import static org.keycloak.protocol.oid4vc.issuance.OIDC4VPIssuerEndpoint.GRANT_TYPE_PRE_AUTHORIZED_CODE; import static org.keycloak.utils.LockObjectsForModification.lockUserSessionsForModification; /** diff --git a/services/src/main/resources/META-INF/services/org.keycloak.protocol.LoginProtocolFactory b/services/src/main/resources/META-INF/services/org.keycloak.protocol.LoginProtocolFactory index a383580112fc..565f437a535c 100755 --- a/services/src/main/resources/META-INF/services/org.keycloak.protocol.LoginProtocolFactory +++ b/services/src/main/resources/META-INF/services/org.keycloak.protocol.LoginProtocolFactory @@ -18,4 +18,4 @@ org.keycloak.protocol.oidc.OIDCLoginProtocolFactory org.keycloak.protocol.saml.SamlProtocolFactory org.keycloak.protocol.docker.DockerAuthV2ProtocolFactory -org.keycloak.protocol.oid4vp.OIDC4VPLoginProtocolFactory \ No newline at end of file +org.keycloak.protocol.oid4vc.OIDC4VPLoginProtocolFactory \ No newline at end of file diff --git a/services/src/main/resources/META-INF/services/org.keycloak.protocol.ProtocolMapper b/services/src/main/resources/META-INF/services/org.keycloak.protocol.ProtocolMapper index 043fb9ba863f..db6bce15ae7e 100755 --- a/services/src/main/resources/META-INF/services/org.keycloak.protocol.ProtocolMapper +++ b/services/src/main/resources/META-INF/services/org.keycloak.protocol.ProtocolMapper @@ -45,7 +45,7 @@ org.keycloak.protocol.saml.mappers.SAMLAudienceResolveProtocolMapper org.keycloak.protocol.oidc.mappers.ClaimsParameterTokenMapper org.keycloak.protocol.saml.mappers.UserAttributeNameIdMapper org.keycloak.protocol.oidc.mappers.ClaimsParameterWithValueIdTokenMapper -org.keycloak.protocol.oid4vp.mappers.OIDC4VPSubjectIdMapper -org.keycloak.protocol.oid4vp.mappers.OIDC4VPStaticClaimMapper -org.keycloak.protocol.oid4vp.mappers.OIDC4VPTargetRoleMapper -org.keycloak.protocol.oid4vp.mappers.OIDC4VPUserAttributeMapper \ No newline at end of file +org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPSubjectIdMapper +org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPStaticClaimMapper +org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPTargetRoleMapper +org.keycloak.protocol.oid4vc.issuance.mappers.OIDC4VPUserAttributeMapper \ No newline at end of file diff --git a/services/src/main/resources/META-INF/services/org.keycloak.services.clientregistration.ClientRegistrationProviderFactory b/services/src/main/resources/META-INF/services/org.keycloak.services.clientregistration.ClientRegistrationProviderFactory index 1fa148f2fc99..e674f4ceed6d 100755 --- a/services/src/main/resources/META-INF/services/org.keycloak.services.clientregistration.ClientRegistrationProviderFactory +++ b/services/src/main/resources/META-INF/services/org.keycloak.services.clientregistration.ClientRegistrationProviderFactory @@ -19,4 +19,4 @@ org.keycloak.services.clientregistration.DefaultClientRegistrationProviderFactor org.keycloak.services.clientregistration.oidc.OIDCClientRegistrationProviderFactory org.keycloak.services.clientregistration.AdapterInstallationClientRegistrationProviderFactory org.keycloak.protocol.saml.clientregistration.EntityDescriptorClientRegistrationProviderFactory -org.keycloak.protocol.oid4vp.OIDC4VPClientRegistrationProviderFactory \ No newline at end of file +org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory \ No newline at end of file diff --git a/services/src/main/resources/META-INF/services/org.keycloak.wellknown.WellKnownProviderFactory b/services/src/main/resources/META-INF/services/org.keycloak.wellknown.WellKnownProviderFactory index 5d80b1669621..840ffa8b2117 100644 --- a/services/src/main/resources/META-INF/services/org.keycloak.wellknown.WellKnownProviderFactory +++ b/services/src/main/resources/META-INF/services/org.keycloak.wellknown.WellKnownProviderFactory @@ -16,5 +16,5 @@ # org.keycloak.authorization.config.UmaWellKnownProviderFactory -org.keycloak.protocol.oid4vp.OIDC4VPIssuerWellKnownProviderFactory -org.keycloak.protocol.oid4vp.OIDC4VPWellKnownProviderFactory \ No newline at end of file +org.keycloak.protocol.oid4vc.issuance.OIDC4VPIssuerWellKnownProviderFactory +org.keycloak.protocol.oid4vc.issuance.OIDC4VPWellKnownProviderFactory \ No newline at end of file diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderTest.java similarity index 96% rename from services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderTest.java index f52041980a14..b049487dc98f 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPClientRegistrationProviderTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/OIDC4VPClientRegistrationProviderTest.java @@ -1,11 +1,14 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc; import org.jboss.logging.Logger; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.keycloak.protocol.oid4vp.model.Format; +import org.keycloak.protocol.oid4vc.OIDC4VPClient; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProvider; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.model.Format; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.services.ErrorResponseException; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/ExpectedResult.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/ExpectedResult.java similarity index 98% rename from services/src/test/java/org/keycloak/protocol/oid4vp/ExpectedResult.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/ExpectedResult.java index 0f656283aa36..e50094968a48 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/ExpectedResult.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/ExpectedResult.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import java.util.Objects; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpointTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpointTest.java similarity index 99% rename from services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpointTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpointTest.java index fb335921d9fb..291ce01a2779 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/OIDC4VPIssuerEndpointTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/OIDC4VPIssuerEndpointTest.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp; +package org.keycloak.protocol.oid4vc.issuance; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; @@ -16,11 +16,13 @@ import org.junit.jupiter.params.provider.MethodSource; import org.keycloak.common.VerificationException; import org.keycloak.models.*; -import org.keycloak.protocol.oid4vp.mappers.*; -import org.keycloak.protocol.oid4vp.model.*; -import org.keycloak.protocol.oid4vp.model.ErrorResponse; -import org.keycloak.protocol.oid4vp.model.Format; -import org.keycloak.protocol.oid4vp.model.SupportedCredential; +import org.keycloak.protocol.oid4vc.OIDC4VPClientRegistrationProviderFactory; +import org.keycloak.protocol.oid4vc.issuance.mappers.*; +import org.keycloak.protocol.oid4vc.mappers.*; +import org.keycloak.protocol.oid4vc.model.*; +import org.keycloak.protocol.oid4vc.model.ErrorResponse; +import org.keycloak.protocol.oid4vc.model.Format; +import org.keycloak.protocol.oid4vc.model.SupportedCredential; import org.keycloak.services.managers.AppAuthManager; import org.keycloak.services.managers.AuthenticationManager; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/JwtSigningServiceTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningServiceTest.java similarity index 96% rename from services/src/test/java/org/keycloak/protocol/oid4vp/signing/JwtSigningServiceTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningServiceTest.java index 50f008b12600..31b82c4ec674 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/JwtSigningServiceTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/JwtSigningServiceTest.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.issuance.signing; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/LDSigningServiceTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningServiceTest.java similarity index 90% rename from services/src/test/java/org/keycloak/protocol/oid4vp/signing/LDSigningServiceTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningServiceTest.java index 9bad9c5bc727..3854a06310a5 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/LDSigningServiceTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/LDSigningServiceTest.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.issuance.signing; import com.fasterxml.jackson.databind.ObjectMapper; import org.bouncycastle.crypto.generators.Ed25519KeyPairGenerator; @@ -9,9 +9,11 @@ import org.bouncycastle.openssl.jcajce.JcaPEMWriter; import org.junit.jupiter.api.Test; import org.keycloak.common.util.Base64; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; -import org.keycloak.protocol.oid4vp.signing.vcdm.Ed255192018Suite; -import org.keycloak.protocol.oid4vp.signing.vcdm.SecuritySuite; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.signing.KeyLoader; +import org.keycloak.protocol.oid4vc.signing.LDSigningService; +import org.keycloak.protocol.oid4vc.signing.vcdm.Ed255192018Suite; +import org.keycloak.protocol.oid4vc.signing.vcdm.SecuritySuite; import java.io.IOException; import java.io.StringWriter; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningServiceTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningServiceTest.java similarity index 97% rename from services/src/test/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningServiceTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningServiceTest.java index 0633e4a6e326..e4a73754abd9 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/SdJwtSigningServiceTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SdJwtSigningServiceTest.java @@ -1,4 +1,4 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.issuance.signing; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; diff --git a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/SigningServiceTest.java b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceTest.java similarity index 92% rename from services/src/test/java/org/keycloak/protocol/oid4vp/signing/SigningServiceTest.java rename to services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceTest.java index 9cd63739c2c6..e45f52a508e6 100644 --- a/services/src/test/java/org/keycloak/protocol/oid4vp/signing/SigningServiceTest.java +++ b/services/src/test/java/org/keycloak/protocol/oid4vc/issuance/signing/SigningServiceTest.java @@ -1,8 +1,8 @@ -package org.keycloak.protocol.oid4vp.signing; +package org.keycloak.protocol.oid4vc.issuance.signing; import org.bouncycastle.openssl.jcajce.JcaPEMWriter; -import org.keycloak.protocol.oid4vp.model.CredentialSubject; -import org.keycloak.protocol.oid4vp.model.VerifiableCredential; +import org.keycloak.protocol.oid4vc.model.CredentialSubject; +import org.keycloak.protocol.oid4vc.model.VerifiableCredential; import java.io.IOException; import java.io.StringWriter;