[java-plugin-shibd] branch main updated: Auto-wire only SP's CredentialResolver via dedicated interface for now.
Codeberg
noreply at shibboleth.net
Mon Jul 27 18:57:41 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd/commit/ffca24f3e348e3acaa8fc6bbb6b86d7836c1d0de
The following commit(s) were added to refs/heads/main by this push:
new ffca24f Auto-wire only SP's CredentialResolver via dedicated interface for now.
ffca24f is described below
commit ffca24f3e348e3acaa8fc6bbb6b86d7836c1d0de
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Jul 27 14:57:15 2026 -0400
Auto-wire only SP's CredentialResolver via dedicated interface for now.
---
.../net/shibboleth/sp/conf/credentials-system.xml | 2 +-
.../impl/ChainingCredentialResolver.java | 44 ++++++++++++++++++++++
2 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
index 84dcac3..2a80a6b 100644
--- a/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
+++ b/sp-conf-impl/src/main/resources/net/shibboleth/sp/conf/credentials-system.xml
@@ -16,7 +16,7 @@
<context:annotation-config />
<!-- Exposes configured resolvers as a callable service. -->
- <bean class="org.opensaml.security.credential.impl.ChainingCredentialResolver" />
+ <bean class="net.shibboleth.sp.credential.impl.ChainingCredentialResolver" />
<!-- Wildcard import hook for plugins. -->
<import resource="classpath*:/META-INF/net/shibboleth/sp/service/credentials/postconfig.xml" />
diff --git a/sp-server-impl/src/main/java/net/shibboleth/sp/credential/impl/ChainingCredentialResolver.java b/sp-server-impl/src/main/java/net/shibboleth/sp/credential/impl/ChainingCredentialResolver.java
new file mode 100644
index 0000000..ac5d360
--- /dev/null
+++ b/sp-server-impl/src/main/java/net/shibboleth/sp/credential/impl/ChainingCredentialResolver.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.shibboleth.sp.credential.impl;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nonnull;
+
+import org.opensaml.security.credential.CredentialResolver;
+
+import net.shibboleth.shared.collection.CollectionSupport;
+import net.shibboleth.sp.credential.OrderedCredentialResolver;
+
+/**
+ * Subclass of OpenSAML chaining resolver that limits itself to implementations of the
+ * {@link OrderedCredentialResolver} interface.
+ */
+public class ChainingCredentialResolver extends org.opensaml.security.credential.impl.ChainingCredentialResolver {
+
+ /**
+ * Constructor.
+ *
+ * @param resolverChain the credential resolver chain
+ */
+ public ChainingCredentialResolver(@Nonnull final List<OrderedCredentialResolver> resolverChain) {
+ super(resolverChain.stream()
+ .map(CredentialResolver.class::cast)
+ .collect(CollectionSupport.nonnullCollector(Collectors.toUnmodifiableList())).get());
+ }
+
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list