[java-idp-plugin-vci] 03/03: Assume type is equal to to format

Codeberg noreply at shibboleth.net
Tue Apr 28 11:21:56 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch dev/VCDM
in repository java-idp-plugin-vci.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-vci/commit/814d9c20bda35eaffa905d950135281b3c80fe14

commit 814d9c20bda35eaffa905d950135281b3c80fe14
Author: Janne Lauros <janne.lauros at csc.fi>
AuthorDate: Tue Apr 28 14:21:34 2026 +0300

    Assume type is equal to to format
---
 .../openidvci/profile/impl/SignJWTCredential.java     | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/SignJWTCredential.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/SignJWTCredential.java
index c3b4ca0..cf8bae7 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/SignJWTCredential.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/SignJWTCredential.java
@@ -208,8 +208,7 @@ public class SignJWTCredential extends AbstractOIDCResponseAction {
                 SignedJWT signedJWT = new SignedJWT(
                         new JWSHeader.Builder(new JWSAlgorithm(signatureSigningParameters.getSignatureAlgorithm()))
                                 .x509CertChain(certificateChainLookupStrategy.apply(signatureSigningParameters))
-                                .type(new JOSEObjectType(
-                                        CredentialFormatToJoseType(ctx.getCredentialConfiguration().getFormat())))
+                                .type(new JOSEObjectType(ctx.getCredentialConfiguration().getFormat()))
                                 .keyID(CredentialConversionUtil.resolveKid(signingCredential)).build(),
                         credential);
 
@@ -230,20 +229,4 @@ public class SignJWTCredential extends AbstractOIDCResponseAction {
         }
     }
 
-    /**
-     * Get JOSE type for credential format. For
-     * https://datatracker.ietf.org/doc/html/draft-ietf-oauth-sd-jwt-vc-11 type is
-     * "dc+sd-jwt" and for https://www.w3.org/TR/vc-jose-cose/#securing-with-sd-jwt
-     * type is "vc+sd-jwt". Propably only mismatching versions but for now followed.
-     * 
-     * @param format jwt_vc_json-ld for W3C sd jwt, otherwise sd jwt assumed.
-     * @return JOSE Type
-     */
-    private String CredentialFormatToJoseType(String format) {
-        switch (format) {
-        case "jwt_vc_json-ld":
-            return "vc+sd-jwt";
-        }
-        return "dc+sd-jwt";
-    }
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list