import org.opensaml.SAMLResponse;
import org.opensaml.SAMLStatement;
import org.opensaml.SAMLSubject;
+import org.opensaml.artifact.Artifact;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Iterator iterator = artifacts.iterator();
StringBuffer artifactBuffer = new StringBuffer(); // Buffer for the transaction log
- while (iterator.hasNext()) {
- destination.append("&SAMLart=");
- String artifact = (String) iterator.next();
- destination.append(URLEncoder.encode(artifact, "UTF-8"));
+ // Construct the artifact query parameter
+ while (iterator.hasNext()) {
+ Artifact artifact = (Artifact) iterator.next();
artifactBuffer.append("(" + artifact + ")");
-
+ destination.append("&SAMLart=");
+ destination.append(artifact.encode());
}
+
log.debug("Redirecting to (" + destination.toString() + ").");
response.sendRedirect(destination.toString()); // Redirect to the artifact receiver