Code cleanup: removed some Shibboleth 1.1 compatibility code.
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / common / ServiceProviderMapper.java
index 50f55b4..bb0aed8 100644 (file)
@@ -138,8 +138,7 @@ public class ServiceProviderMapper {
                                        if (relyingParties.containsKey(parent.getName())) {
                                                log.info("Found matching Relying Party for group (" + parent.getName() + ").");
                                                return (RelyingParty) relyingParties.get(parent.getName());
                                        if (relyingParties.containsKey(parent.getName())) {
                                                log.info("Found matching Relying Party for group (" + parent.getName() + ").");
                                                return (RelyingParty) relyingParties.get(parent.getName());
-                                       }
-                                       else {
+                                       } else {
                                                log.debug("Provider is a member of group (" + parent.getName()
                                                                + "), but no matching Relying Party was found.");
                                        }
                                                log.debug("Provider is a member of group (" + parent.getName()
                                                                + "), but no matching Relying Party was found.");
                                        }
@@ -163,17 +162,6 @@ public class ServiceProviderMapper {
        }
 
        /**
        }
 
        /**
-        * Returns the relying party for a legacy provider(the default)
-        */
-       public RelyingParty getLegacyRelyingParty() {
-
-               RelyingParty relyingParty = getDefaultRelyingParty();
-               log.info("Request is from legacy shib SP.  Selecting default Relying Party: (" + relyingParty.getName() + ").");
-               return new LegacyWrapper((RelyingParty) relyingParty);
-
-       }
-
-       /**
         * Returns the appropriate relying party for the supplied service provider id.
         */
        public RelyingParty getRelyingParty(String providerIdFromSP) {
         * Returns the appropriate relying party for the supplied service provider id.
         */
        public RelyingParty getRelyingParty(String providerIdFromSP) {
@@ -296,7 +284,7 @@ public class ServiceProviderMapper {
                        } else {
                                log.debug("Relying party defaults to multiple assertions when pushing attributes.");
                        }
                        } else {
                                log.debug("Relying party defaults to multiple assertions when pushing attributes.");
                        }
-                       
+
                        // Relying Party wants assertions signed?
                        attribute = ((Element) partyConfig).getAttribute("signAssertions");
                        if (attribute != null && !attribute.equals("")) {
                        // Relying Party wants assertions signed?
                        attribute = ((Element) partyConfig).getAttribute("signAssertions");
                        if (attribute != null && !attribute.equals("")) {
@@ -418,11 +406,6 @@ public class ServiceProviderMapper {
                        return identityProvider;
                }
 
                        return identityProvider;
                }
 
-               public boolean isLegacyProvider() {
-
-                       return false;
-               }
-
                public String[] getNameMapperIds() {
 
                        return (String[]) mappingIds.toArray(new String[0]);
                public String[] getNameMapperIds() {
 
                        return (String[]) mappingIds.toArray(new String[0]);
@@ -466,9 +449,10 @@ public class ServiceProviderMapper {
                }
 
                public boolean singleAssertion() {
                }
 
                public boolean singleAssertion() {
+
                        return singleAssertion;
                }
                        return singleAssertion;
                }
-               
+
                public boolean defaultToPOSTProfile() {
 
                        return defaultToPOST;
                public boolean defaultToPOSTProfile() {
 
                        return defaultToPOST;
@@ -549,11 +533,6 @@ public class ServiceProviderMapper {
                        return wrapped.getName();
                }
 
                        return wrapped.getName();
                }
 
-               public boolean isLegacyProvider() {
-
-                       return false;
-               }
-
                public IdentityProvider getIdentityProvider() {
 
                        return wrapped.getIdentityProvider();
                public IdentityProvider getIdentityProvider() {
 
                        return wrapped.getIdentityProvider();
@@ -595,10 +574,10 @@ public class ServiceProviderMapper {
                }
 
                public boolean singleAssertion() {
                }
 
                public boolean singleAssertion() {
-                       
+
                        return wrapped.singleAssertion();
                }
                        return wrapped.singleAssertion();
                }
-               
+
                public boolean defaultToPOSTProfile() {
 
                        return wrapped.defaultToPOSTProfile();
                public boolean defaultToPOSTProfile() {
 
                        return wrapped.defaultToPOSTProfile();
@@ -661,11 +640,6 @@ public class ServiceProviderMapper {
                        return wrapped.getNameMapperIds();
                }
 
                        return wrapped.getNameMapperIds();
                }
 
-               public boolean isLegacyProvider() {
-
-                       return wrapped.isLegacyProvider();
-               }
-
                public URL getAAUrl() {
 
                        return wrapped.getAAUrl();
                public URL getAAUrl() {
 
                        return wrapped.getAAUrl();
@@ -692,10 +666,10 @@ public class ServiceProviderMapper {
                }
 
                public boolean singleAssertion() {
                }
 
                public boolean singleAssertion() {
-                       
+
                        return false;
                }
                        return false;
                }
-               
+
                public boolean defaultToPOSTProfile() {
 
                        return true;
                public boolean defaultToPOSTProfile() {
 
                        return true;
@@ -723,39 +697,6 @@ public class ServiceProviderMapper {
        }
 
        /**
        }
 
        /**
-        * Relying party wrapper for Shibboleth <=1.1 service providers.
-        * 
-        * @author Walter Hoehn
-        */
-       class LegacyWrapper extends UnknownProviderWrapper implements RelyingParty {
-
-               LegacyWrapper(RelyingParty wrapped) {
-
-                       super(wrapped, null);
-               }
-
-               public boolean isLegacyProvider() {
-
-                       return true;
-               }
-
-               public String[] getNameMapperIds() {
-
-                       return ((RelyingParty) wrapped).getNameMapperIds();
-               }
-
-               public URL getAAUrl() {
-
-                       return ((RelyingParty) wrapped).getAAUrl();
-               }
-
-               public URI getDefaultAuthMethod() {
-
-                       return ((RelyingParty) wrapped).getDefaultAuthMethod();
-               }
-       }
-
-       /**
         * Relying party wrapper for providers for which we have no metadata
         * 
         * @author Walter Hoehn
         * Relying party wrapper for providers for which we have no metadata
         * 
         * @author Walter Hoehn