[java-plugin-shibd] branch main updated: Remove migrated class.

Codeberg noreply at shibboleth.net
Tue Nov 17 17:21:05 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/36be54682f52c67c6188528f1cb4f848b7be727d

The following commit(s) were added to refs/heads/main by this push:
     new 36be546  Remove migrated class.
36be546 is described below

commit 36be54682f52c67c6188528f1cb4f848b7be727d
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Tue Nov 17 12:20:41 2026 -0500

    Remove migrated class.
---
 .../context/logic/HttpServletRequestPredicate.java | 97 ----------------------
 1 file changed, 97 deletions(-)

diff --git a/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java b/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java
deleted file mode 100644
index f2475ca..0000000
--- a/sp-server-api/src/main/java/net/shibboleth/sp/profile/context/logic/HttpServletRequestPredicate.java
+++ /dev/null
@@ -1,97 +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.profile.context.logic;
-
-import java.util.function.Predicate;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-import org.opensaml.profile.context.ProfileRequestContext;
-import org.slf4j.Logger;
-
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
-import net.shibboleth.shared.component.AbstractInitializableComponent;
-import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.logic.Constraint;
-import net.shibboleth.shared.primitive.LoggerFactory;
-import net.shibboleth.shared.primitive.NonnullSupplier;
-import net.shibboleth.shared.servlet.HttpServletRequestValidator;
-
-/**
- * A predicate that supports configurable evaluation of servlet request state to
- * produce a result via the {@link HttpServletRequestValidator} interface.
- */
-public class HttpServletRequestPredicate extends AbstractInitializableComponent
-        implements Predicate<ProfileRequestContext> {
-
-    /** Class logger. */
-    @Nonnull private Logger log = LoggerFactory.getLogger(HttpServletRequestPredicate.class);
-
-    /** Request supplier. */
-    @NonnullAfterInit private NonnullSupplier<HttpServletRequest> httpServletRequestSupplier;
-
-    /** Validator to use. */
-    @NonnullAfterInit private HttpServletRequestValidator requestValidator;
-    
-    /**
-     * Sets the supplier for the {@link HttpServletRequest} to evaluate.
-     * 
-     * @param supplier request supplier
-     */
-    public void setHttpServletRequestSupplier(@Nullable final NonnullSupplier<HttpServletRequest> supplier) {
-        httpServletRequestSupplier = supplier;
-    }
-    
-    /**
-     * Sets the validator to apply.
-     * 
-     * @param validator request validator
-     */
-    public void setHttpServletRequestValidator(@Nonnull final HttpServletRequestValidator validator) {
-        requestValidator = Constraint.isNotNull(validator, "HttpServletRequestValidator cannot be null");
-    }
-    
-    /** {@inheritDoc} */
-    @Override
-    protected void doInitialize() throws ComponentInitializationException {
-        super.doInitialize();
-        
-        if (httpServletRequestSupplier == null) {
-            throw new ComponentInitializationException("HttpServletRequest supplier was null");
-        } else if (requestValidator == null) {
-            throw new ComponentInitializationException("HttpServletRequestValidator was null");
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean test(@Nullable final ProfileRequestContext input) {
-
-        try {
-            requestValidator.validate(httpServletRequestSupplier.get());
-        } catch (final ServletException e) {
-            log.debug("Request failed validation: {}", e.getMessage());
-            return false;
-        } catch (final IllegalStateException e) {
-            log.debug("HttpServletRequest not present, failing validation");
-            return false;
-        }
-        
-        return true;
-    }
-
-}
\ 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