From a7be17b1ffda17ac455c1e883415d2a9f0025545 Mon Sep 17 00:00:00 2001
From: Jaime Perez <jaime.perez@uninett.no>
Date: Tue, 4 Mar 2014 16:24:59 +0100
Subject: [PATCH] Remove support for hosted SP metadata in
 MetadataStorageHandler.

---
 .../Metadata/MetaDataStorageHandler.php       | 24 +++++--------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
index 759ff2867..3e086193f 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php
@@ -73,7 +73,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 	 * @param $set  The set we the property comes from.
 	 * @return The autogenerated metadata property.
 	 */
-	public function getGenerated($property, $set = 'saml20-sp-hosted') {
+	public function getGenerated($property, $set) {
 
 		/* First we check if the user has overridden this property in the metadata. */
 		try {
@@ -93,19 +93,12 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 			$config->getBaseURL();
 		
 		if ($set == 'saml20-sp-hosted') {
-			switch ($property) {				
-				case 'AssertionConsumerService' : 
-					return $baseurl . 'saml2/sp/AssertionConsumerService.php';
-
-				case 'SingleLogoutService' : 
-					return $baseurl . 'saml2/sp/SingleLogoutService.php';					
-
+			switch ($property) {
 				case 'SingleLogoutServiceBinding' :
 					return SAML2_Const::BINDING_HTTP_REDIRECT;
 			}
 		} elseif($set == 'saml20-idp-hosted') {
-
-			switch ($property) {				
+			switch ($property) {
 				case 'SingleSignOnService' : 
 					return $baseurl . 'saml2/idp/SSOService.php';
 
@@ -118,11 +111,6 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 				case 'SingleLogoutServiceBinding' :
 					return SAML2_Const::BINDING_HTTP_REDIRECT;
 			}
-		} elseif($set == 'shib13-sp-hosted') {
-			switch ($property) {				
-				case 'AssertionConsumerService' : 
-					return $baseurl . 'shib13/sp/AssertionConsumerService.php';
-			}
 		} elseif($set == 'shib13-idp-hosted') {
 			switch ($property) {				
 				case 'SingleSignOnService' : 
@@ -181,7 +169,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 	 * @param $set  The set we want metadata from.
 	 * @return An associative array with the metadata.
 	 */
-	public function getMetaDataCurrent($set = 'saml20-sp-hosted') {
+	public function getMetaDataCurrent($set) {
 		return $this->getMetaData(NULL, $set);
 	}
 
@@ -194,7 +182,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 	 * @param $type Do you want to return the metaindex or the entityID. [entityid|metaindex]
 	 * @return The entity id which is associated with the current hostname/path combination.
 	 */
-	public function getMetaDataCurrentEntityID($set = 'saml20-sp-hosted', $type = 'entityid') {
+	public function getMetaDataCurrentEntityID($set, $type = 'entityid') {
 
 		assert('is_string($set)');
 
@@ -268,7 +256,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
 	 *                   the current entity id based on the current hostname/path.
 	 * @param $set  The set of metadata we are looking up the entity id in.
 	 */
-	public function getMetaData($index, $set = 'saml20-sp-hosted') {
+	public function getMetaData($index, $set) {
 
 		assert('is_string($set)');
 
-- 
GitLab