[java-idp-plugin-vci] branch dev/DPOP updated: Support for DPoP access tokens

Codeberg noreply at shibboleth.net
Mon Dec 8 12:00:51 UTC 2025


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

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

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

The following commit(s) were added to refs/heads/dev/DPOP by this push:
     new 857452c  Support for DPoP access tokens
857452c is described below

commit 857452cd786c76289cced47588239842fd88ebf6
Author: jlauros <janne.lauros at csc.fi>
AuthorDate: Mon Dec 8 14:00:39 2025 +0200

    Support for DPoP access tokens
---
 .../messaging/impl/OpenIDVCICredentialsRequest.java        | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

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 38af9e6..979c8dd 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
@@ -20,6 +20,9 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Map;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -29,7 +32,6 @@ import com.nimbusds.oauth2.sdk.ParseException;
 import com.nimbusds.oauth2.sdk.ProtectedResourceRequest;
 import com.nimbusds.oauth2.sdk.http.HTTPRequest;
 import com.nimbusds.oauth2.sdk.token.AccessToken;
-import com.nimbusds.oauth2.sdk.token.BearerAccessToken;
 
 /**
  * Class partly implementing Open ID VCI Credential Request message as described
@@ -71,10 +73,14 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
      *                    request is intended, {@code null} if not specified (if,
      *                    for example, the {@link #toHTTPRequest()} method will not
      *                    be used).
-     * @param accessToken OAuth2 bearer token.
+     * @param accessToken OAuth2 access token.
      */
-    protected OpenIDVCICredentialsRequest(URI uri, AccessToken accessToken) {
+    protected OpenIDVCICredentialsRequest(@Nullable URI uri, @Nonnull AccessToken accessToken) {
         super(uri, accessToken);
+        
+        if (accessToken == null) {
+            throw new IllegalArgumentException("The access token must not be null");
+        }
     }
 
     /**
@@ -183,7 +189,7 @@ public class OpenIDVCICredentialsRequest extends ProtectedResourceRequest {
     public static OpenIDVCICredentialsRequest parse(final HTTPRequest httpRequest) throws ParseException {
         httpRequest.ensureMethod(HTTPRequest.Method.POST);
         httpRequest.ensureEntityContentType(ContentType.APPLICATION_JSON);
-        BearerAccessToken accessToken = BearerAccessToken.parse(httpRequest);
+        AccessToken accessToken = AccessToken.parse(httpRequest);
         Map<String, Object> payload;
         try {
             payload = new ObjectMapper().readValue(httpRequest.getQuery(), new TypeReference<Map<String, Object>>() {

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


More information about the commits mailing list