[java-identity-provider] 01/05: IDP-1423 Remove more deprecated attributes.
Rod Widdowson
rdw at steadingsoftware.com
Mon Mar 4 08:33:15 EST 2019
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=087b54f167c55fc5abd334a9beadd67fc07fe5ea
commit 087b54f167c55fc5abd334a9beadd67fc07fe5ea
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sun Mar 3 15:12:42 2019 +0000
IDP-1423 Remove more deprecated attributes.
https://issues.shibboleth.net/jira/browse/IDP-1423
"maintainExpiredMetadata" for FilesystemMetadataProvider
(which was never implemented in V3)
"encoded" for DynamicHTTPMetadataProvider
---
.../impl/DynamicHTTPMetadataProviderParser.java | 14 +-------------
.../metadata/DynamicHTTPMetadataProviderParserTest.java | 17 -----------------
.../metadata/dynamicTemplateWithLegacyEncoded.xml | 15 ---------------
.../src/main/resources/schema/shibboleth-metadata.xsd | 15 ---------------
4 files changed, 1 insertion(+), 60 deletions(-)
diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/DynamicHTTPMetadataProviderParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/DynamicHTTPMetadataProviderParser.java
index 327b83f..466a193 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/DynamicHTTPMetadataProviderParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/impl/DynamicHTTPMetadataProviderParser.java
@@ -31,10 +31,7 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.w3c.dom.Element;
import net.shibboleth.idp.profile.spring.relyingparty.metadata.AbstractMetadataProviderParser;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
-import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
-import net.shibboleth.utilities.java.support.xml.AttributeSupport;
import net.shibboleth.utilities.java.support.xml.ElementSupport;
/**
@@ -151,7 +148,7 @@ public class DynamicHTTPMetadataProviderParser extends AbstractDynamicHTTPMetada
}
/**
- * Parse the 'encodingStyle' and 'encoded' attributes for Template element types.
+ * Parse the 'encodingStyle' attributes for Template element types.
* @param template the Template element
*
* @return the encoding style as a string
@@ -160,15 +157,6 @@ public class DynamicHTTPMetadataProviderParser extends AbstractDynamicHTTPMetada
String encodingStyle = null;
if (template.hasAttributeNS(null, "encodingStyle")) {
encodingStyle = StringSupport.trimOrNull(template.getAttributeNS(null, "encodingStyle"));
- } else if (template.hasAttributeNS(null, "encoded")) {
- DeprecationSupport.warnOnce(ObjectType.ATTRIBUTE, "encoded", null, "'encodingStyle'");
- final Boolean encoded =
- AttributeSupport.getAttributeValueAsBoolean(template.getAttributeNodeNS(null, "encoded"));
- if (encoded != null && encoded) {
- encodingStyle = "form";
- } else {
- encodingStyle = "none";
- }
}
if (encodingStyle == null) {
encodingStyle = "form";
diff --git a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
index 6be03d2..8edf658 100644
--- a/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
+++ b/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
@@ -252,23 +252,6 @@ public class DynamicHTTPMetadataProviderParserTest extends AbstractMetadataParse
}
@Test
- public void testTemplateWithLegacyEncoded() throws Exception {
- MockPropertySource propSource = singletonPropertySource(PROP_MDURL,
- RepositorySupport.buildHTTPResourceURL(REPO_OPENSAML, TEMPLATE_URL, false));
-
- final FunctionDrivenDynamicHTTPMetadataResolver resolver = getBean(FunctionDrivenDynamicHTTPMetadataResolver.class,
- propSource, "dynamicTemplateWithLegacyEncoded.xml", "beans.xml");
-
- final String entityID = "https://www.example.org/sp";
-
- final CriteriaSet criteriaSet = new CriteriaSet( new EntityIdCriterion(entityID));
-
- final EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
- Assert.assertNotNull(ed);
- Assert.assertEquals(ed.getEntityID(), entityID);
- }
-
- @Test
public void testMDQ() throws Exception {
final FunctionDrivenDynamicHTTPMetadataResolver resolver = getBean(FunctionDrivenDynamicHTTPMetadataResolver.class,
"dynamicMetadataQueryProtocol.xml", "beans.xml");
diff --git a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamicTemplateWithLegacyEncoded.xml b/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamicTemplateWithLegacyEncoded.xml
deleted file mode 100644
index 160b2ec..0000000
--- a/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamicTemplateWithLegacyEncoded.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata:MetadataProvider xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
- xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd
- urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd"
-
- id="dynamicTemplate" xsi:type="metadata:DynamicHTTPMetadataProvider" >
-
- <!-- Note: use of the transformRef here is mostly just to facilitate testing. -->
- <metadata:Template transformRef="digester.SHA1HexLower" encoded="true">
- %{metadataURL}
- </metadata:Template>
-
-</metadata:MetadataProvider>
-
\ No newline at end of file
diff --git a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
index aa1ea90..f30ee65 100644
--- a/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
+++ b/idp-schema/src/main/resources/schema/shibboleth-metadata.xsd
@@ -269,11 +269,6 @@
<documentation>The path to the metadata file.</documentation>
</annotation>
</attribute>
- <attribute name="maintainExpiredMetadata" type="string">
- <annotation>
- <documentation>This is deprecated, use requireValidMetadata instead.</documentation>
- </annotation>
- </attribute>
</extension>
</complexContent>
</complexType>
@@ -316,16 +311,6 @@
</documentation>
</annotation>
</attribute>
- <attribute name="encoded" type="string">
- <annotation>
- <documentation>
- Deprecated, use encodingStyle instead.
-
- Boolean flag indicating whether the entityID should be URL form-encoded
- before substitution into the template.
- </documentation>
- </annotation>
- </attribute>
<attribute name="encodingStyle" type="string">
<annotation>
<documentation>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list