[java-idp-oidc] branch main updated: JOIDC-143 - IdP logs message at WARN when attribute filter returns no values after filtering
Henri Mikkonen
henri.mikkonen at iki.fi
Thu Mar 14 06:09:42 UTC 2024
This is an automated email from the git hooks/post-receive script.
hjmikkon pushed a commit to branch main
in repository java-idp-oidc.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-oidc.git;a=commit;h=47eb9faff22f4398aee43ab90dccbea2dfefaaec
The following commit(s) were added to refs/heads/main by this push:
new 47eb9faf JOIDC-143 - IdP logs message at WARN when attribute filter returns no values after filtering
47eb9faf is described below
commit 47eb9faff22f4398aee43ab90dccbea2dfefaaec
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Mar 14 08:08:56 2024 +0200
JOIDC-143 - IdP logs message at WARN when attribute filter returns no values after filtering
https://shibboleth.atlassian.net/browse/JOIDC-143
Don't return null in any case from getMatchingValues(..) method.
---
.../filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcher.java | 2 +-
.../matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcher.java b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcher.java
index 19ff244e..d5b4ada1 100644
--- a/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcher.java
+++ b/idp-oidc-extension-impl/src/main/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcher.java
@@ -139,7 +139,7 @@ public class AttributeInOIDCRequestedClaimsMatcher extends AbstractIdentifiableI
ProfileRequestContext.class).apply(filtercontext);
if (profileRequestContext == null || profileRequestContext.getOutboundMessageContext() == null) {
log.trace("{} No outbound message context", getLogPrefix());
- return null;
+ return Collections.emptySet();
}
final OIDCAuthenticationResponseContext respCtx = profileRequestContext.getOutboundMessageContext()
.getSubcontext(OIDCAuthenticationResponseContext.class);
diff --git a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
index fbe59097..0fe3830a 100644
--- a/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
+++ b/idp-oidc-extension-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/attribute/filter/matcher/impl/AttributeInOIDCRequestedClaimsMatcherTest.java
@@ -133,7 +133,9 @@ public class AttributeInOIDCRequestedClaimsMatcherTest {
setUp(false, false);
matcher.initialize();
prc.setOutboundMessageContext(null);
- Assert.assertNull(matcher.getMatchingValues(attribute, filtercontext));
+ final Set<IdPAttributeValue> result = matcher.getMatchingValues(attribute, filtercontext);
+ Assert.assertNotNull(result);
+ Assert.assertEquals(result.size(), 0);
}
@Test
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list