aboutsummaryrefslogtreecommitdiff
path: root/id.server
diff options
context:
space:
mode:
authorharald.bratko <harald.bratko@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-01-10 15:41:07 +0000
committerharald.bratko <harald.bratko@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-01-10 15:41:07 +0000
commit06fb5360df0e2c13cc3be39f38740dc61d33afa7 (patch)
tree31e3daaa17241db8e28bcc180b73f3db6e22445d /id.server
parent7bba49753c8a44fade100d3676ab0a62372d44e1 (diff)
downloadmoa-id-spss-06fb5360df0e2c13cc3be39f38740dc61d33afa7.tar.gz
moa-id-spss-06fb5360df0e2c13cc3be39f38740dc61d33afa7.tar.bz2
moa-id-spss-06fb5360df0e2c13cc3be39f38740dc61d33afa7.zip
Adapted for MOA-ID 1.4 (validating additional infoboxes).
When building the SOAP response, changed validating parsing to non validating parsing because SAML attributes may include signatures having same Id attributes. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@770 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id.server')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java b/id.server/src/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java
index 945aa54fd..64cb16181 100644
--- a/id.server/src/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java
+++ b/id.server/src/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java
@@ -7,6 +7,7 @@ import org.w3c.dom.Element;
import at.gv.egovernment.moa.id.BuildException;
import at.gv.egovernment.moa.util.Constants;
import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
/**
* Builder for the <code>lt;samlp:Response&gt;</code> used for passing
@@ -74,8 +75,8 @@ public class SAMLResponseBuilder implements Constants {
statusCode,
xmlSubStatusCode,
statusMessage,
- removeXMLDeclaration(samlAssertion) });
- Element domResponse = DOMUtils.parseDocument(xmlResponse, true, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ StringUtils.removeXMLDeclaration(samlAssertion) });
+ Element domResponse = DOMUtils.parseDocument(xmlResponse, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
return domResponse;
}
catch (Throwable ex) {
@@ -85,17 +86,6 @@ public class SAMLResponseBuilder implements Constants {
ex);
}
}
- /**
- * Removes the XML declaration from an XML expression.
- * @param xmlString XML expression as String
- * @return XML expression, XML declaration removed
- */
- private String removeXMLDeclaration(String xmlString) {
- if (xmlString.startsWith("<?xml")) {
- int firstElement = xmlString.indexOf("<", 1);
- return xmlString.substring(firstElement);
- }
- else return xmlString;
- }
+
}