[java-idp-plugin-vci] branch dev/PROOFVERIFY updated: Remove handling of credentials request parameter 'proof' as it is no more supported

Codeberg noreply at shibboleth.net
Thu Nov 20 10:59:23 UTC 2025


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

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

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

The following commit(s) were added to refs/heads/dev/PROOFVERIFY by this push:
     new 765c50e  Remove handling of credentials request parameter 'proof' as it is no more supported
765c50e is described below

commit 765c50ec63d0fda682613b1bef2aa2bd1faad160
Author: jlauros <janne.lauros at csc.fi>
AuthorDate: Thu Nov 20 12:42:49 2025 +0200

    Remove handling of credentials request parameter 'proof' as it is no more supported
---
 .../impl/OpenIDVCICredentialsRequestDecoder.java   |  2 +-
 .../impl/OpenIDVCICredentialsRequest.java          | 76 +---------------------
 .../plugin/openidvci/profile/impl/ParseProof.java  |  2 +-
 .../impl/OpenIDVCICredentialsRequestTest.java      | 22 +------
 .../openidvci/profile/impl/ParseProofTest.java     | 30 +--------
 5 files changed, 7 insertions(+), 125 deletions(-)

diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/decoding/impl/OpenIDVCICredentialsRequestDecoder.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/decoding/impl/OpenIDVCICredentialsRequestDecoder.java
index c6599d3..5992f5d 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/decoding/impl/OpenIDVCICredentialsRequestDecoder.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/decoding/impl/OpenIDVCICredentialsRequestDecoder.java
@@ -58,7 +58,7 @@ public class OpenIDVCICredentialsRequestDecoder extends BaseOpenIDVCIRequestDeco
                 : MoreObjects.toStringHelper(this).omitNullValues()
                         .add("credential_identifier", message.getCredentialConfigurationId())
                         .add("credential_configuration_id", message.getCredentialConfigurationId())
-                        .add("proof", message.getProof()).add("proofs", message.getProofs())
+                        .add("proofs", message.getProofs())
                         .add("credential_response_encryption", message.getCredentialResponseEncryption()).toString();
     }
 }
\ No newline at end of file
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequest.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequest.java
index aa763eb..38af9e6 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequest.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequest.java
@@ -46,12 +46,6 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
     /** Key to locate credential_configuration_id - field of request. */
     private final static String credentialConfigurationIdKey = "credential_configuration_id";
 
-    /** Key to locate proof_type - field of request. */
-    private final static String proofTypeKey = "proof_type";
-
-    /** Key to locate proof - field of request. */
-    private final static String proofKey = "proof";
-
     /** Key to locate proofs - field of request. */
     private final static String proofsKey = "proofs";
 
@@ -64,15 +58,6 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
     /** Request parameter credential_configuration_id. */
     private String credentialConfigurationId;
 
-    /** Request parameter inner field proof_type. */
-    private String proofType;
-
-    // TODO: ! Replace proof, proofs and credentialResponseEncryption with classes
-    // that parse themselves.
-
-    /** Request parameter proof. */
-    private Map<String, Object> proof;
-
     /** Request parameter proofs. */
     private Map<String, Object> proofs;
 
@@ -130,43 +115,6 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
         credentialConfigurationId = id;
     }
 
-    /**
-     * Get request parameter inner field proof_type.
-     * 
-     * @return Request parameter inner field proof_type
-     */
-    public String getProofType() {
-        return proofType;
-    }
-
-    /**
-     * Set request parameter inner field proof_type.
-     * 
-     * @param type Request parameter inner field proof_type
-     */
-    private void setProofType(String type) {
-        proofType = type;
-    }
-
-    /**
-     * Get request parameter proof.
-     * 
-     * @return Request parameter proof
-     */
-    public Map<String, Object> getProof() {
-        return proof;
-
-    }
-
-    /**
-     * Set request parameter proof.
-     * 
-     * @param proof Request parameter proof
-     */
-    private void setProof(Map<String, Object> proof) {
-        this.proof = proof;
-    }
-
     /**
      * Get request parameter proofs.
      * 
@@ -214,20 +162,6 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
             throw new IllegalArgumentException(
                     "Request must not have both credential_identifier and credential_configuration_id fields");
         }
-        /*
-         * IN COMMENTS due to v14 vs v15 differences:
-         *
-         * if (credentialIdentifier == null && credentialConfigurationId == null) {
-         * throw new IllegalArgumentException(
-         * "Request must have either credential_identifier or credential_configuration_id fields"
-         * ); }
-         */
-        if (proof != null && proofs != null) {
-            throw new IllegalArgumentException("Request must not have both proof and proofs fields");
-        }
-        if (proof != null && proofType == null) {
-            throw new IllegalArgumentException("Request field proof must have proof_type inner field");
-        }
     }
 
     /**
@@ -245,8 +179,7 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
      * @return parsed request.
      * @throws ParseException if parsing failed.
      */
-    @SuppressWarnings("unchecked") // TODO: ! Replace proof, proofs and credentialResponseEncryption with classes
-                                   // that parse themselves.
+    @SuppressWarnings("unchecked")
     public static OpenIDVCICredentialsRequest parse(final HTTPRequest httpRequest) throws ParseException {
         httpRequest.ensureMethod(HTTPRequest.Method.POST);
         httpRequest.ensureEntityContentType(ContentType.APPLICATION_JSON);
@@ -269,13 +202,6 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
         request.setCredentialIdentifier((payload.get(credentialIdentifierKey) instanceof String value) ? value : null);
         request.setCredentialConfigurationId(
                 (payload.get(credentialConfigurationIdKey) instanceof String value) ? value : null);
-        // TODO: ! Replace proof, proofs and credentialResponseEncryption with classes
-        // that parse themselves.
-        // that parse themselves !
-        request.setProof((Map<String, Object>) payload.get(proofKey));
-        if (request.getProof() != null) {
-            request.setProofType((request.getProof().get(proofTypeKey) instanceof String value) ? value : null);
-        }
         request.setProofs((Map<String, Object>) payload.get(proofsKey));
         request.setCredentialResponseEncryption((Map<String, Object>) payload.get(credentialResponseEncryptionKey));
         request.validate();
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProof.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProof.java
index b5011d6..e4041a5 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProof.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProof.java
@@ -62,7 +62,7 @@ public class ParseProof extends AbstractProfileAction {
         }
         if (profileRequestContext.getInboundMessageContext()
                 .getMessage() instanceof OpenIDVCICredentialsRequest request) {
-            proof = request.getProof() != null ? request.getProof() : request.getProofs();
+            proof = request.getProofs();
         }
         if (proof == null) {
             log.debug("{} Request does not contain proof or proofs, nothing to do");
diff --git a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequestTest.java b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequestTest.java
index 3b9ae04..309a184 100644
--- a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequestTest.java
+++ b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/messaging/impl/OpenIDVCICredentialsRequestTest.java
@@ -47,8 +47,6 @@ public class OpenIDVCICredentialsRequestTest {
         OpenIDVCICredentialsRequest request = OpenIDVCICredentialsRequest.parse(httpRequest);
         Assert.assertEquals(request.getCredentialConfigurationId(), "org.iso.18013.5.1.mDL");
         Assert.assertNull(request.getCredentialIdentifier());
-        Assert.assertNotNull(request.getProof());
-        Assert.assertEquals(request.getProofType(), "jwt");
         Assert.assertNull(request.getProofs());
         Assert.assertNull(request.getCredentialResponseEncryption());
     }
@@ -63,21 +61,10 @@ public class OpenIDVCICredentialsRequestTest {
         OpenIDVCICredentialsRequest request = OpenIDVCICredentialsRequest.parse(httpRequest);
         Assert.assertEquals(request.getCredentialIdentifier(), "CivilEngineeringDegree-2023");
         Assert.assertNull(request.getCredentialConfigurationId());
-        Assert.assertNull(request.getProof());
-        Assert.assertNull(request.getProofType());
         Assert.assertNotNull(request.getProofs());
         Assert.assertNull(request.getCredentialResponseEncryption());
     }
-
-    @Test(expectedExceptions = IllegalArgumentException.class)
-    public void failMissingProofType() throws ParseException {
-        httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"
-                + "  \"proof\": {\n"
-                + "    \"jwt\": \"eyJraWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEva2V5cy8xIiwiYWxnIjoiRVMyNTYiLCJ0eXAiOiJKV1QifQ\"\n"
-                + "  }\n" + "}");
-        OpenIDVCICredentialsRequest.parse(httpRequest);
-    }
-
+    
     @Test(expectedExceptions = IllegalArgumentException.class)
     public void failProofAndProofs() throws ParseException {
         httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"
@@ -90,11 +77,4 @@ public class OpenIDVCICredentialsRequestTest {
         OpenIDVCICredentialsRequest.parse(httpRequest);
     }
 
-    //@Test(expectedExceptions = IllegalArgumentException.class)
-    public void failMissingCreds() throws ParseException {
-        httpRequest.setQuery("{\n" + "  \"proof\": {\n" + "    \"proof_type\": \"jwt\",\n"
-                + "    \"jwt\": \"eyJraWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEva2V5cy8xIiwiYWxnIjoiRVMyNTYiLCJ0eXAiOiJKV1QifQ\"\n"
-                + "  }\n" + "}");
-        OpenIDVCICredentialsRequest.parse(httpRequest);
-    }
 }
\ No newline at end of file
diff --git a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProofTest.java b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProofTest.java
index d00df63..a70b2d2 100644
--- a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProofTest.java
+++ b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ParseProofTest.java
@@ -54,8 +54,9 @@ public class ParseProofTest {
         httpRequest.setAuthorization("Bearer dGVzdDp0ZXN0");
         httpRequest.setContentType("application/json");
         httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"
-                + "  \"proof\": {\n" + "    \"proof_type\": \"jwt\",\n"
-                + "    \"jwt\": \"eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIsImFsZyI6IkVTMjU2Iiwia2lkIjoiZGlkOmp3azpleUpoYkdjaU9pSkZVekkxTmlJc0luVnpaU0k2SW5OcFp5SXNJbXQwZVNJNklrVkRJaXdpWTNKMklqb2lVQzB5TlRZaUxDSjRJam9pVWtGQ2RVaHNTR05IYkdwMlVWVkpkVTlyYTNKQlJEaHJYM2RUVFZSaGNuQnJOR0p5TnpaQldXUTJheUlzSW5raU9pSldYMEZNVERKamFEaEJWMTlHV0hKMVMxWnVZazV0U3poUmVFUnpNblE0UmpSdU5USlFhRWwxVjFObkluMCMwIn0.eyJhdWQiOiJodHRwczovL2dlYW50LXZjaS4yLnJhaHRpYXBwLmZpL29pZDR2Y2kiLCJpYXQiOjE3NDQyNzU1OTEsImV4cCI6MTc0ND [...]
+                + "  \"proofs\": {\n"
+                + "    \"jwt\": [\"eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIsImFsZyI6IkVTMjU2Iiwia2lkIjoiZGlkOmp3azpleUpoYkdjaU9pSkZVekkxTmlJc0luVnpaU0k2SW5OcFp5SXNJbXQwZVNJNklrVkRJaXdpWTNKMklqb2lVQzB5TlRZaUxDSjRJam9pVWtGQ2RVaHNTR05IYkdwMlVWVkpkVTlyYTNKQlJEaHJYM2RUVFZSaGNuQnJOR0p5TnpaQldXUTJheUlzSW5raU9pSldYMEZNVERKamFEaEJWMTlHV0hKMVMxWnVZazV0U3poUmVFUnpNblE0UmpSdU5USlFhRWwxVjFObkluMCMwIn0.eyJhdWQiOiJodHRwczovL2dlYW50LXZjaS4yLnJhaHRpYXBwLmZpL29pZDR2Y2kiLCJpYXQiOjE3NDQyNzU1OTEsImV4cCI6MTc0N [...]
+                + "              \"eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIsImFsZyI6IkVTMjU2Iiwia2lkIjoiZGlkOmp3azpleUpoYkdjaU9pSkZVekkxTmlJc0luVnpaU0k2SW5OcFp5SXNJbXQwZVNJNklrVkRJaXdpWTNKMklqb2lVQzB5TlRZaUxDSjRJam9pVWtGQ2RVaHNTR05IYkdwMlVWVkpkVTlyYTNKQlJEaHJYM2RUVFZSaGNuQnJOR0p5TnpaQldXUTJheUlzSW5raU9pSldYMEZNVERKamFEaEJWMTlHV0hKMVMxWnVZazV0U3poUmVFUnpNblE0UmpSdU5USlFhRWwxVjFObkluMCMwIn0.eyJhdWQiOiJodHRwczovL2dlYW50LXZjaS4yLnJhaHRpYXBwLmZpL29pZDR2Y2kiLCJpYXQiOjE3NDQyNzU1OTEsImV4cCI6MTc0N [...]
                 + "  }\n" + "}\n" + "");
 
         requestCtx = new RequestContextBuilder().buildRequestContext();
@@ -65,24 +66,9 @@ public class ParseProofTest {
         action = new ParseProof();
         action.initialize();
     }
-
-    @Test
-    public void testSuccessProof() {
-       ActionTestingSupport.assertProceedEvent(action.execute(requestCtx));
-       CredentialsContext ctx = profileRequestCtx.getInboundMessageContext().getSubcontext(CredentialsContext.class);
-       Assert.assertNotNull(ctx);
-       Assert.assertNotNull(ctx.getProofs());
-       Assert.assertEquals(ctx.getProofs().size(),1);
-    }
     
     @Test
     public void testSuccessProofs() throws ParseException {
-        httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"
-                + "  \"proofs\": {\n"
-                + "    \"jwt\": [\"eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIsImFsZyI6IkVTMjU2Iiwia2lkIjoiZGlkOmp3azpleUpoYkdjaU9pSkZVekkxTmlJc0luVnpaU0k2SW5OcFp5SXNJbXQwZVNJNklrVkRJaXdpWTNKMklqb2lVQzB5TlRZaUxDSjRJam9pVWtGQ2RVaHNTR05IYkdwMlVWVkpkVTlyYTNKQlJEaHJYM2RUVFZSaGNuQnJOR0p5TnpaQldXUTJheUlzSW5raU9pSldYMEZNVERKamFEaEJWMTlHV0hKMVMxWnVZazV0U3poUmVFUnpNblE0UmpSdU5USlFhRWwxVjFObkluMCMwIn0.eyJhdWQiOiJodHRwczovL2dlYW50LXZjaS4yLnJhaHRpYXBwLmZpL29pZDR2Y2kiLCJpYXQiOjE3NDQyNzU1OTEsImV4cCI6MTc0N [...]
-                + "              \"eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIsImFsZyI6IkVTMjU2Iiwia2lkIjoiZGlkOmp3azpleUpoYkdjaU9pSkZVekkxTmlJc0luVnpaU0k2SW5OcFp5SXNJbXQwZVNJNklrVkRJaXdpWTNKMklqb2lVQzB5TlRZaUxDSjRJam9pVWtGQ2RVaHNTR05IYkdwMlVWVkpkVTlyYTNKQlJEaHJYM2RUVFZSaGNuQnJOR0p5TnpaQldXUTJheUlzSW5raU9pSldYMEZNVERKamFEaEJWMTlHV0hKMVMxWnVZazV0U3poUmVFUnpNblE0UmpSdU5USlFhRWwxVjFObkluMCMwIn0.eyJhdWQiOiJodHRwczovL2dlYW50LXZjaS4yLnJhaHRpYXBwLmZpL29pZDR2Y2kiLCJpYXQiOjE3NDQyNzU1OTEsImV4cCI6MTc0N [...]
-                + "  }\n" + "}\n" + "");
-        profileRequestCtx.getInboundMessageContext().setMessage(OpenIDVCICredentialsRequest.parse(httpRequest));
         ActionTestingSupport.assertProceedEvent(action.execute(requestCtx));
         CredentialsContext ctx = profileRequestCtx.getInboundMessageContext().getSubcontext(CredentialsContext.class);
         Assert.assertNotNull(ctx);
@@ -90,16 +76,6 @@ public class ParseProofTest {
         Assert.assertEquals(ctx.getProofs().size(),2);
     }
 
-    @Test
-    public void testUnsupportedProof() throws ParseException {
-        httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"
-                + "  \"proof\": {\n" + "    \"proof_type\": \"ldp_vp\",\n"
-                + "    \"ldp_vp\": \"eyJraWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEva2V5cy8xIiwiYWxnIjoiRVMyNTYiLCJ0eXAiOiJKV1QifQ\"\n"
-                + "  }\n" + "}\n" + "");
-        profileRequestCtx.getInboundMessageContext().setMessage(OpenIDVCICredentialsRequest.parse(httpRequest));
-        ActionTestingSupport.assertEvent(action.execute(requestCtx), OpenIDVCIEventIds.PROOF_TYPE_UNSUPPORTED);
-    }
-
     @Test
     public void testUnsupportedProofs() throws ParseException {
         httpRequest.setQuery("{\n" + "  \"credential_configuration_id\": \"org.iso.18013.5.1.mDL\",\n"

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


More information about the commits mailing list