From 042e84fdcc3c43962ff8e1a773413770d30a42d2 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 16 Feb 2010 12:22:03 +0000
Subject: [PATCH] SAMLBuilder: Move ArtifactResolutionService to the correct
 position.

According to the schema, the ArtifactResolutionService element(s)
should be located before the SingleLogoutService element(s).

Patch by Danny Bollaert <danny.bollaert@gmail.com>.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2184 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Metadata/SAMLBuilder.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php
index 3a832d507..5b69a056b 100644
--- a/lib/SimpleSAML/Metadata/SAMLBuilder.php
+++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php
@@ -420,6 +420,10 @@ class SimpleSAML_Metadata_SAMLBuilder {
 
 		$this->addCertificate($e, $metadata);
 
+		if ($metadata->hasValue('ArtifactResolutionService')){
+			$this->addEndpoints($e, 'ArtifactResolutionService', $metadata->getEndpoints('ArtifactResolutionService'));
+		}
+
 		$this->addEndpoints($e, 'SingleLogoutService', $metadata->getEndpoints('SingleLogoutService'));
 
 		if ($metadata->hasValue('NameIDFormat')) {
@@ -428,10 +432,6 @@ class SimpleSAML_Metadata_SAMLBuilder {
 			$e->appendChild($t);
 		}
 
-		if ($metadata->hasValue('ArtifactResolutionService')){
-			$this->addEndpoints($e, 'ArtifactResolutionService', $metadata->getEndpoints('ArtifactResolutionService'));
-		}
-
 		$this->addEndpoints($e, 'SingleSignOnService', $metadata->getEndpoints('SingleSignOnService'));
 
 		$this->entityDescriptor->appendChild($e);
-- 
GitLab