[java-idp-plugin-vci] branch dev/W3CCred updated: Simplify method
Codeberg
noreply at shibboleth.net
Mon Jan 5 12:50:30 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch dev/W3CCred
in repository java-idp-plugin-vci.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-vci/commit/37524de87729d822d36844438aae31eac670e9ea
The following commit(s) were added to refs/heads/dev/W3CCred by this push:
new 37524de Simplify method
37524de is described below
commit 37524de87729d822d36844438aae31eac670e9ea
Author: jlauros <janne.lauros at csc.fi>
AuthorDate: Mon Jan 5 14:50:19 2026 +0200
Simplify method
---
.../profile/impl/FormSelectiveDisclosureJWTCredential.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormSelectiveDisclosureJWTCredential.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormSelectiveDisclosureJWTCredential.java
index 5963413..6fbd977 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormSelectiveDisclosureJWTCredential.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormSelectiveDisclosureJWTCredential.java
@@ -37,7 +37,6 @@ import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.shared.annotation.constraint.NonnullBeforeExec;
import com.nimbusds.jwt.JWTClaimsSet;
-import com.nimbusds.jwt.JWTClaimsSet.Builder;
import com.nimbusds.oauth2.sdk.ParseException;
/**
@@ -105,19 +104,15 @@ public class FormSelectiveDisclosureJWTCredential extends AbstractProfileAction
credential.getRequestedCredential().forEach(claim -> claims.put(claim.getPath().get(0), claim.getValue()));
SelectiveDisclosureClaimSetUtil sdClaims = new SelectiveDisclosureClaimSetUtil(claims);
List<JWTClaimsSet> credentials = new ArrayList<>();
- // add selective disclosure claims to each shell
ctx.getCredentialShells().forEach(cred -> {
- Builder build = null;
try {
- build = new JWTClaimsSet.Builder(cred.toJWTClaimsSet()).claim("_sd", sdClaims.get_sd()).claim("_sd_alg",
- sdClaims.get_alg());
+ credentials.add(new JWTClaimsSet.Builder(cred.toJWTClaimsSet()).claim("_sd", sdClaims.get_sd())
+ .claim("_sd_alg", sdClaims.get_alg()).build());
} catch (ParseException e) {
log.error("{} Parsing credential failed", getLogPrefix(), e);
ActionSupport.buildEvent(profileRequestContext, OpenIDVCIEventIds.INVALID_CREDENTIAL);
return;
}
- credentials.add(build.build());
-
});
ctx.setJWTCredentials(credentials);
ctx.setDisclosures(sdClaims.getFormattedDisclosures());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list