[java-plugin-shibd] branch main updated: Migrate delegating RPC back into main libs.

Codeberg noreply at shibboleth.net
Tue Nov 17 16:24:22 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/d7c1372772860ed30a07bca0a82b51a4d63b1650

The following commit(s) were added to refs/heads/main by this push:
     new d7c1372  Migrate delegating RPC back into main libs.
d7c1372 is described below

commit d7c1372772860ed30a07bca0a82b51a4d63b1650
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Tue Nov 17 11:23:56 2026 -0500

    Migrate delegating RPC back into main libs.
---
 .../java/net/shibboleth/sp/BasicApplication.java   |   1 +
 .../sp/DelegatingRelyingPartyConfiguration.java    | 127 ---------------------
 2 files changed, 1 insertion(+), 127 deletions(-)

diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/BasicApplication.java b/sp-server-api/src/main/java/net/shibboleth/sp/BasicApplication.java
index 877ba9e..7f0bed8 100644
--- a/sp-server-api/src/main/java/net/shibboleth/sp/BasicApplication.java
+++ b/sp-server-api/src/main/java/net/shibboleth/sp/BasicApplication.java
@@ -45,6 +45,7 @@ import net.shibboleth.idp.attribute.resolver.AttributeResolver;
 import net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry;
 import net.shibboleth.profile.config.ProfileConfiguration;
 import net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration;
+import net.shibboleth.profile.relyingparty.DelegatingRelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
 import net.shibboleth.profile.relyingparty.VerifiedProfileCriterion;
 import net.shibboleth.profile.relyingparty.impl.DefaultRelyingPartyConfigurationResolver;
diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/DelegatingRelyingPartyConfiguration.java b/sp-server-api/src/main/java/net/shibboleth/sp/DelegatingRelyingPartyConfiguration.java
deleted file mode 100644
index a6ce153..0000000
--- a/sp-server-api/src/main/java/net/shibboleth/sp/DelegatingRelyingPartyConfiguration.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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;
-
-import java.util.Map;
-import java.util.function.Predicate;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.opensaml.security.config.SecurityConfiguration;
-
-import net.shibboleth.profile.config.ProfileConfiguration;
-import net.shibboleth.profile.relyingparty.RelyingPartyConfiguration;
-import net.shibboleth.shared.annotation.constraint.NotLive;
-import net.shibboleth.shared.annotation.constraint.Unmodifiable;
-import net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.StringSupport;
-
-/**
- * Wrapper for {@link RelyingPartyConfiguration} that will handle absent settings
- * by delegating to an injected instance of {@link Application}.
- */
-public class DelegatingRelyingPartyConfiguration extends AbstractIdentifiableInitializableComponent
-        implements RelyingPartyConfiguration, Predicate<ProfileRequestContext> {
-
-    /** Inheritance source. */
-    @Nonnull private Application application;
-    
-    /** Delegation target. */
-    @Nonnull private RelyingPartyConfiguration relyingPartyConfiguration;
-    
-    /** Whether to treat an empty profile configuration set as a valid outcome. */
-    private boolean honorEmptyProfileCollection;
-    
-    /**
-     * Constructor.
-     *
-     * @param app inheritance source
-     * @param config delegation target
-     * @param honorEmpty whether to treat empty profile configuration collection as legitimate
-     */
-    public DelegatingRelyingPartyConfiguration(@Nonnull final Application app,
-            @Nonnull final RelyingPartyConfiguration config, final boolean honorEmpty) {
-        application = Constraint.isNotNull(app, "Application cannot be null");
-        relyingPartyConfiguration = Constraint.isNotNull(config, "RelyingPartyConfiguration cannot be null");
-        honorEmptyProfileCollection = honorEmpty;
-    }
-     
-    /** {@inheritDoc} */
-    @Override
-    @Nullable public String getId() {
-        return relyingPartyConfiguration.getId();
-    }
-
-    /** {@inheritDoc} */
-    public boolean test(@Nullable final ProfileRequestContext input) {
-        return relyingPartyConfiguration.test(input);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("removal")
-    public void setResponderId(@Nullable final String issuer) {
-        relyingPartyConfiguration.setResponderId(issuer);
-    }
-    
-    /** {@inheritDoc} */
-    @Nullable public String getIssuer(@Nullable final ProfileRequestContext profileRequestContext) {
-        final String issuer = relyingPartyConfiguration.getIssuer(profileRequestContext);
-        if (issuer != null) {
-            return issuer;
-        }
-        return application.getIssuer(profileRequestContext);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable public SecurityConfiguration getSecurityConfiguration(
-            @Nullable final ProfileRequestContext profileRequestContext) {
-        
-        final SecurityConfiguration config = relyingPartyConfiguration.getSecurityConfiguration(profileRequestContext);
-        if (config != null) {
-            return config;
-        }
-        return application.getSecurityConfiguration(profileRequestContext);
-    }
-
-    /** {@inheritDoc} */
-    @Nonnull @Unmodifiable @NotLive public Map<String,ProfileConfiguration> getProfileConfigurations(
-            @Nullable final ProfileRequestContext profileRequestContext) {
-        
-        final var profiles = relyingPartyConfiguration.getProfileConfigurations(profileRequestContext);
-        if (honorEmptyProfileCollection || !profiles.isEmpty()) {
-            return profiles;
-        }
-        return application.getProfileConfigurations(profileRequestContext);
-    }
-
-    /** {@inheritDoc} */
-    public ProfileConfiguration getProfileConfiguration(ProfileRequestContext profileRequestContext, String profileId) {
-        final String trimmedId = StringSupport.trimOrNull(profileId);
-        if (trimmedId == null) {
-            return null;
-        }
-
-        return getProfileConfigurations(profileRequestContext).get(trimmedId);
-    }
-    
-    /** {@inheritDoc} */
-    public boolean isDetailedErrors(ProfileRequestContext profileRequestContext) {
-        return relyingPartyConfiguration.isDetailedErrors(profileRequestContext);
-    }
-
-}
\ 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