[java-idp-plugin-vci] 01/04: Client authentication is now a must in request

Codeberg noreply at shibboleth.net
Tue Nov 10 10:10:09 UTC 2026


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

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

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

commit ccb06e3100559cb5147f32e3c283a2a9b9e2d949
Author: Janne Lauros <janne.lauros at csc.fi>
AuthorDate: Tue Nov 10 11:58:31 2026 +0200

    Client authentication is now a must in request
---
 .../statuslist/messaging/impl/StatusListRevokeRequest.java   | 12 +++++-------
 .../messaging/impl/StatusListRevokeRequestTest.java          |  8 ++++++++
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequest.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequest.java
index e43d2af..148d736 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequest.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequest.java
@@ -36,9 +36,7 @@ import com.nimbusds.oauth2.sdk.auth.ClientAuthentication;
 import com.nimbusds.oauth2.sdk.http.HTTPRequest;
 
 /**
- * Request to revoke one slot of a status list, as in
- * <a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-status-list/">
- * draft-ietf-oauth-status-list</a>.
+ * Request to revoke slot in status list.
  */
 public class StatusListRevokeRequest extends AbstractOptionallyIdentifiedRequest {
 
@@ -122,6 +120,10 @@ public class StatusListRevokeRequest extends AbstractOptionallyIdentifiedRequest
             throw new ParseException(e.getMessage(),
                     OAuth2Error.INVALID_REQUEST.appendDescription(": " + e.getMessage()));
         }
+        if (clientAuthentication == null) {
+            throw new ParseException("Missing client authentication",
+                    OAuth2Error.INVALID_CLIENT.appendDescription(": no client authentication"));
+        }
 
         final Map<String, Object> payload;
         try {
@@ -139,10 +141,6 @@ public class StatusListRevokeRequest extends AbstractOptionallyIdentifiedRequest
             throw new ParseException(e.getMessage(), e);
         }
 
-        if (clientAuthentication == null) {
-            throw new ParseException("Missing client authentication",
-                    OAuth2Error.INVALID_CLIENT.appendDescription(": no client authentication"));
-        }
         final StatusListRevokeRequest request = new StatusListRevokeRequest(uri, clientAuthentication);
 
         if (!(payload.get(StatusListParameters.BUCKET_PARAMETER) instanceof String listId) || listId.isEmpty()) {
diff --git a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequestTest.java b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequestTest.java
index 6716b51..2a4778d 100644
--- a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequestTest.java
+++ b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/statuslist/messaging/impl/StatusListRevokeRequestTest.java
@@ -66,6 +66,14 @@ public class StatusListRevokeRequestTest {
         Assert.assertEquals(e.getErrorObject().getCode(), OAuth2Error.INVALID_CLIENT.getCode());
     }
 
+    @Test
+    public void testNoClientAuthenticationBeforeBody() throws Exception {
+        final ParseException e = Assert.expectThrows(ParseException.class,
+                () -> StatusListRevokeRequest.parse(request(null, "not json")));
+
+        Assert.assertEquals(e.getErrorObject().getCode(), OAuth2Error.INVALID_CLIENT.getCode());
+    }
+
     @Test
     public void testMissingId() throws Exception {
         final ParseException e = Assert.expectThrows(ParseException.class,

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


More information about the commits mailing list