[java-identity-provider COMMIT] in /trunk/idp-installer/src: main/java/net/shibboleth/idp/installer/ant/MetadataGener...

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 20 18:54:41 EST 2015


Author: scantor
Date: Tue Jan 20 18:54:41 2015
New Revision: 7271

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7271&view=rev
Log:
IDP-576 - comment out SLO endpoints, add support to ant task and fix test

Modified:
    trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java
    trunk/idp-installer/src/test/java/net/shibboleth/idp/installer/TestMetadataGenerator.java

Modified: trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java?rev=7271&r1=7270&r2=7271&view=diff
==============================================================================
--- trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java (original)
+++ trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java Tue Jan 20 18:54:41 2015
@@ -77,6 +77,11 @@
     private boolean saml2AttributeQueryCommented = true;
 
     /**
+     * Whether to comment out the SAML2 SLO endpoints.
+     */
+    private boolean saml2LogoutCommented = true;
+
+    /**
      * Where is idp.home.
      * 
      * @return Returns idpHome.
@@ -172,6 +177,20 @@
         saml2AttributeQueryCommented = asComment;
     }
 
+    /** Returns whether to comment the SAML2 Logout endpoints.
+     * @return  whether to comment the SAML2 Logout endpoints
+     */
+    public boolean isSAML2LogoutCommented() {
+        return saml2LogoutCommented;
+    }
+
+    /** Sets whether to comment the SAML2 Logout endpoints.
+     * @param asComment whether to comment or not
+     */
+    public void setSAML2LogoutCommented(boolean asComment) {
+        saml2LogoutCommented = asComment;
+    }
+    
     /** {@inheritDoc} */
     // Checkstyle: CyclomaticComplexity OFF
     @Override public void execute() {
@@ -231,6 +250,7 @@
                 generator.setScope(parameters.getScope());
             }
             generator.setSAML2AttributeQueryCommented(isSAML2AttributeQueryCommented());
+            generator.setSAML2LogoutCommented(isSAML2LogoutCommented());
             generator.generate();
 
         } catch (Exception e) {

Modified: trunk/idp-installer/src/test/java/net/shibboleth/idp/installer/TestMetadataGenerator.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-installer/src/test/java/net/shibboleth/idp/installer/TestMetadataGenerator.java?rev=7271&r1=7270&r2=7271&view=diff
==============================================================================
--- trunk/idp-installer/src/test/java/net/shibboleth/idp/installer/TestMetadataGenerator.java (original)
+++ trunk/idp-installer/src/test/java/net/shibboleth/idp/installer/TestMetadataGenerator.java Tue Jan 20 18:54:41 2015
@@ -45,10 +45,11 @@
  */
 public class TestMetadataGenerator extends XMLObjectBaseTestCase {
 
-    @Test public void generator() throws IOException {
+    @Test public void withSAMLLogout() throws IOException {
         final MetadataGeneratorTask task = new MetadataGeneratorTask();
         final Resource backChannelCrt = new ClassPathResource("/credentials/idp-backchannel.crt");
         task.setBackchannelCert(backChannelCrt.getFile());
+        task.setSAML2LogoutCommented(false);
         final File out = File.createTempFile("TestMetadataGenerator", ".xml");
         System.setProperty("idp.home", "classpath:");
 
@@ -109,7 +110,7 @@
             Assert.assertSame(entity.getIDPSSODescriptor("urn:mace:shibboleth:1.0"), idpsso);
             Assert.assertNull(entity.getIDPSSODescriptor("urn:mace:shibboleth:1.0:nameid"));
             Assert.assertEquals(idpsso.getArtifactResolutionServices().size(), 2);
-            Assert.assertEquals(idpsso.getSingleLogoutServices().size(), 4);
+            Assert.assertEquals(idpsso.getSingleLogoutServices().size(), 0);
             Assert.assertEquals(idpsso.getSingleSignOnServices().size(), 4);
             Assert.assertEquals(idpsso.getNameIDFormats().size(), 2);
             List<XMLObject> exts = idpsso.getExtensions().getUnknownXMLObjects();



More information about the commits mailing list