[java-idp-plugin-vci] 01/02: Correct error code per what conformance tests expect
Codeberg
noreply at shibboleth.net
Fri Oct 2 11:09:45 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-idp-plugin-vci.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-vci/commit/4546a83b0ad26e3c396e7d089381ec12d8b47ce3
commit 4546a83b0ad26e3c396e7d089381ec12d8b47ce3
Author: Janne Lauros <janne.lauros at csc.fi>
AuthorDate: Fri Oct 2 14:08:49 2026 +0300
Correct error code per what conformance tests expect
---
.../openidvci/profile/impl/ValidateRequestedCredential.java | 5 +++++
.../openidvci/profile/impl/ValidateRequestedCredentialTest.java | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredential.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredential.java
index 42a6b44..b44abb7 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredential.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredential.java
@@ -213,6 +213,11 @@ public class ValidateRequestedCredential extends AbstractCredentialValidationAct
ActionSupport.buildEvent(profileRequestContext, OpenIDVCIEventIds.UNKNOWN_CREDENTIAL_IDENTIFIER);
return;
}
+ if (identifier == null && getCredentialConfigurations().get(configurationId) == null) {
+ log.error("{} Credential configuration {} is unknown", getLogPrefix(), configurationId);
+ ActionSupport.buildEvent(profileRequestContext, OpenIDVCIEventIds.NO_CREDENTIALS_FOR_REQUEST);
+ return;
+ }
if (identifier == null && issuedIdentifiers != null && !issuedIdentifiers.isEmpty()
&& !allowCredentialConfigurationIdWithIdentifiers) {
log.error("{} Request has credential_configuration_id {} although credential identifiers were issued",
diff --git a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredentialTest.java b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredentialTest.java
index a2d34d1..58aab10 100644
--- a/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredentialTest.java
+++ b/openid-vci-impl/src/test/java/org/geant/shibboleth/plugin/openidvci/profile/impl/ValidateRequestedCredentialTest.java
@@ -147,6 +147,14 @@ public class ValidateRequestedCredentialTest {
ActionTestingSupport.assertEvent(action.execute(requestCtx), OpenIDVCIEventIds.NO_CREDENTIAL_REQUEST);
}
+ @Test
+ public void testUnknownConfigurationIdWithIssuedIdentifiers() throws Exception {
+ setRequest("{\"credential_configuration_id\":\"Unknown\"}");
+ setGrant(Map.of("GeantIncubatorDiploma", CONTENT),
+ Map.of("GeantIncubatorDiploma", issued("GeantIncubatorDiploma")));
+ ActionTestingSupport.assertEvent(action.execute(requestCtx), OpenIDVCIEventIds.NO_CREDENTIALS_FOR_REQUEST);
+ }
+
@Test
public void testConfigurationIdWithIssuedIdentifiersAllowed() throws Exception {
configuration.setAllowCredentialConfigurationIdWithIdentifiers(true);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list