[java-plugin-shibd] branch main updated: Remove some SAML dependencies.

Scott Cantor cantor.2 at osu.edu
Wed Aug 21 14:05:16 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=45004219b8a8800b1c61477374cd690990231260

The following commit(s) were added to refs/heads/main by this push:
     new 4500421  Remove some SAML dependencies.
4500421 is described below

commit 45004219b8a8800b1c61477374cd690990231260
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Aug 21 10:05:13 2024 -0400

    Remove some SAML dependencies.
---
 .../shibboleth/sp/flows/AbstractSPFlowTest.java    | 52 ----------------------
 sp-server-api/pom.xml                              |  6 ---
 sp-server-impl/pom.xml                             | 10 -----
 3 files changed, 68 deletions(-)

diff --git a/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/AbstractSPFlowTest.java b/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/AbstractSPFlowTest.java
index 2d5ed4d..81e8085 100644
--- a/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/AbstractSPFlowTest.java
+++ b/sp-conf-impl/src/test/java/net/shibboleth/sp/flows/AbstractSPFlowTest.java
@@ -19,17 +19,12 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.Charset;
-import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import org.apache.commons.codec.binary.Base64;
-import org.opensaml.messaging.context.MessageContext;
-import org.opensaml.messaging.decoder.MessageDecodingException;
-import org.opensaml.saml.common.SAMLObject;
-import org.opensaml.saml.saml2.binding.decoding.impl.HTTPRedirectDeflateDecoder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.mock.web.MockHttpServletRequest;
@@ -41,10 +36,6 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 
 import net.shibboleth.idp.test.flows.AbstractFlowTest;
-import net.shibboleth.shared.collection.Pair;
-import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.net.URISupport;
-import net.shibboleth.shared.primitive.NonnullSupplier;
 import net.shibboleth.shared.servlet.impl.HttpServletRequestResponseContext;
 import net.shibboleth.shared.xml.ParserPool;
 import net.shibboleth.sp.ddf.DDF;
@@ -196,49 +187,6 @@ public abstract class AbstractSPFlowTest extends AbstractFlowTest {
             return null;
         }
     }
-    
-    /**
-     * Decodes a SAML message encoded via HTTP-Redirect binding.
-     * 
-     * @param url the encoded redirect
-     * 
-     * @return decoded message
-     * @throws MessageDecodingException 
-     */
-    @Nonnull protected SAMLObject decodeRedirect(@Nullable final String url) throws MessageDecodingException {
-        final MockHttpServletRequest mock = new MockHttpServletRequest("GET", url);
-        final int index = url != null ? url.indexOf('?') : -1;
-        if (url == null || index < 0) {
-            throw new MessageDecodingException("No query string");
-        }
-        final List<Pair<String,String>> params = URISupport.parseQueryString(url.substring(index + 1));
-        for (final var param : params) {
-            final String name = param.getFirst();
-            if (name != null) {
-                mock.addParameter(name, param.getSecond());
-            }
-        }
-        
-        final HTTPRedirectDeflateDecoder decoder = new HTTPRedirectDeflateDecoder();
-        decoder.setHttpServletRequestSupplier(NonnullSupplier.of(mock));
-        decoder.setParserPool(parserPool);
-        
-        try {
-            decoder.initialize();
-        } catch (final ComponentInitializationException e) {
-            throw new MessageDecodingException(e);
-        }
-        
-        decoder.decode();
-        
-        final MessageContext mc = decoder.getMessageContext();
-        decoder.destroy();
-        
-        if (mc != null && mc.getMessage() instanceof SAMLObject saml) {
-            return saml;
-        }
-        throw new MessageDecodingException("No message, or incorrect type.");
-    }
 
     /**
      * Test whether a flag is non-null and true.
diff --git a/sp-server-api/pom.xml b/sp-server-api/pom.xml
index f642e18..1a657cb 100644
--- a/sp-server-api/pom.xml
+++ b/sp-server-api/pom.xml
@@ -28,12 +28,6 @@
             <artifactId>idp-profile-api</artifactId>
             <scope>provided</scope>
         </dependency>
-
-        <dependency>
-            <groupId>${idp.groupId}</groupId>
-            <artifactId>idp-saml-impl</artifactId>
-            <scope>provided</scope>
-        </dependency>
                 
         <dependency>
             <groupId>${shib-profile.groupId}</groupId>
diff --git a/sp-server-impl/pom.xml b/sp-server-impl/pom.xml
index 9b12b47..4bb9f94 100644
--- a/sp-server-impl/pom.xml
+++ b/sp-server-impl/pom.xml
@@ -91,21 +91,11 @@
             <artifactId>opensaml-profile-impl</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>${opensaml.groupId}</groupId>
-            <artifactId>opensaml-saml-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>${opensaml.groupId}</groupId>
             <artifactId>opensaml-storage-api</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>${opensaml.groupId}</groupId>
-            <artifactId>opensaml-xmlsec-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
 
         <dependency>
             <groupId>${shib-shared.groupId}</groupId>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list