[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
Mon Nov 3 11:01:03 EST 2014
Author: rdw
Date: Mon Nov 3 11:01:03 2014
New Revision: 6830
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6830&view=rev
Log:
IDP-481 Comment out SAML2 AA endpoint
Modified:
trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/ant/MetadataGeneratorTask.java
trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/metadata/MetadataGenerator.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=6830&r1=6829&r2=6830&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 Mon Nov 3 11:01:03 2014
@@ -71,6 +71,11 @@
@Nullable private String scope;
/**
+ * Whether to comment out the SAML2 AA port.
+ */
+ private boolean saml2AttributeQueryCommented = true;
+
+ /**
* Where is idp.home.
*
* @return Returns idpHome.
@@ -150,6 +155,20 @@
*/
public void setScope(String value) {
scope = value;
+ }
+
+ /** Returns whether to comment the SAML2 AA endpoint.
+ * @return Returns when to comment the SAML2 AA endpoint.
+ */
+ public boolean isSAML2AttributeQueryCommented() {
+ return saml2AttributeQueryCommented;
+ }
+
+ /** Sets whether to comment the SAML2 AA endpoint.
+ * @param asComment whether to comment or not.
+ */
+ public void setSAML2AttributeQueryCommented(boolean asComment) {
+ saml2AttributeQueryCommented = asComment;
}
/** {@inheritDoc} */
@@ -210,6 +229,7 @@
} else {
generator.setScope(parameters.getScope());
}
+ generator.setSAML2AttributeQueryCommented(isSAML2AttributeQueryCommented());
generator.generate();
} catch (Exception e) {
Modified: trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/metadata/MetadataGenerator.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/metadata/MetadataGenerator.java?rev=6830&r1=6829&r2=6830&view=diff
==============================================================================
--- trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/metadata/MetadataGenerator.java (original)
+++ trunk/idp-installer/src/main/java/net/shibboleth/idp/installer/metadata/MetadataGenerator.java Mon Nov 3 11:01:03 2014
@@ -132,6 +132,11 @@
* The Scope.
*/
private String scope;
+
+ /**
+ * Whether to comment out the SAML2 AA port.
+ */
+ private boolean saml2AttributeQueryCommented = true;
/**
* The signing certificates.
@@ -276,12 +281,25 @@
endpoints = Constraint.isNotNull(points, "supplied endpoints should not be null");
}
+ /** Returns whether to comment the SAML2 AA endpoint.
+ * @return Returns when to comment the SAML2 AA endpoint.
+ */
+ public boolean isSAML2AttributeQueryCommented() {
+ return saml2AttributeQueryCommented;
+ }
+
+ /** Sets whether to comment the SAML2 AA endpoint.
+ * @param asComment whether to comment or not.
+ */
+ public void setSAML2AttributeQueryCommented(boolean asComment) {
+ saml2AttributeQueryCommented = asComment;
+ }
+
/**
* Generate the metadata.
*
* @throws IOException if we have a failure.
*/
-
public void generate() throws IOException {
writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
writer.newLine();
@@ -770,6 +788,9 @@
case SAML2Query:
writer.write(" ");
+ if (isSAML2AttributeQueryCommented()) {
+ writer.write("<!-- ");
+ }
writer.write("<");
writer.write(AttributeService.DEFAULT_ELEMENT_LOCAL_NAME);
writer.write(" Binding=\"");
@@ -777,6 +798,9 @@
writer.write("\" Location=\"https://");
writer.write(getDNSName());
writer.write(":8443/idp/profile/SAML2/SOAP/AttributeQuery\"/>");
+ if (isSAML2AttributeQueryCommented()) {
+ writer.write(" -->");
+ }
writer.newLine();
break;
More information about the commits
mailing list