From 17b3faf89c5b178049118dc04f75a07eb76c8b40 Mon Sep 17 00:00:00 2001
From: Jaime Perez <jaime.perez@uninett.no>
Date: Tue, 8 Jul 2014 14:12:22 +0200
Subject: [PATCH] Mark the old SP interfaces in www/ as deprecated.

---
 www/saml2/sp/AssertionConsumerService.php  | 10 ++++++++++
 www/saml2/sp/SingleLogoutService.php       | 10 ++++++++++
 www/saml2/sp/idpdisco.php                  | 10 ++++++++++
 www/saml2/sp/initSLO.php                   | 10 ++++++++++
 www/saml2/sp/initSSO.php                   |  9 +++++++++
 www/saml2/sp/metadata.php                  | 10 ++++++++++
 www/shib13/sp/AssertionConsumerService.php | 10 ++++++++++
 www/shib13/sp/idpdisco.php                 | 10 ++++++++++
 www/shib13/sp/initSSO.php                  |  9 +++++++++
 www/shib13/sp/metadata.php                 |  9 +++++++++
 www/wsfed/sp/idpdisco.php                  | 10 ++++++++++
 www/wsfed/sp/initSLO.php                   | 10 ++++++++++
 www/wsfed/sp/initSSO.php                   | 11 +++++++++++
 www/wsfed/sp/prp.php                       | 11 +++++++++++
 14 files changed, 139 insertions(+)

diff --git a/www/saml2/sp/AssertionConsumerService.php b/www/saml2/sp/AssertionConsumerService.php
index b55fc97be..88dbc5c3c 100644
--- a/www/saml2/sp/AssertionConsumerService.php
+++ b/www/saml2/sp/AssertionConsumerService.php
@@ -1,5 +1,13 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 /**
@@ -14,6 +22,8 @@ require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 
+SimpleSAML_Logger::warning('The file saml2/sp/AssertionConsumerService.php is deprecated and will be removed in future versions.');
+
 /* Get the session object for the user. Create a new session if no session
  * exists for this user.
  */
diff --git a/www/saml2/sp/SingleLogoutService.php b/www/saml2/sp/SingleLogoutService.php
index cf9f94cd0..e0b6f8a32 100644
--- a/www/saml2/sp/SingleLogoutService.php
+++ b/www/saml2/sp/SingleLogoutService.php
@@ -1,10 +1,20 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file saml2/sp/SingleLogoutService.php is deprecated and will be removed in future versions.');
+
 // Get the local session
 $session = SimpleSAML_Session::getInstance();
 
diff --git a/www/saml2/sp/idpdisco.php b/www/saml2/sp/idpdisco.php
index 6425cddf7..b7cdff381 100644
--- a/www/saml2/sp/idpdisco.php
+++ b/www/saml2/sp/idpdisco.php
@@ -1,7 +1,17 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
+SimpleSAML_Logger::warning('The file saml2/sp/idpdisco.php is deprecated and will be removed in future versions.');
+
 try {
 	$discoHandler = new SimpleSAML_XHTML_IdPDisco(array('saml20-idp-remote'), 'saml20');
 } catch (Exception $exception) {
diff --git a/www/saml2/sp/initSLO.php b/www/saml2/sp/initSLO.php
index 4b8b2f547..de4f3810f 100644
--- a/www/saml2/sp/initSLO.php
+++ b/www/saml2/sp/initSLO.php
@@ -1,11 +1,21 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 
 $session = SimpleSAML_Session::getInstance();
 
+SimpleSAML_Logger::warning('The file saml2/sp/initSLO.php is deprecated and will be removed in future versions.');
+
 SimpleSAML_Logger::info('SAML2.0 - SP.initSLO: Accessing SAML 2.0 SP initSLO script');
 
 if (!$config->getBoolean('enable.saml20-sp', TRUE))
diff --git a/www/saml2/sp/initSSO.php b/www/saml2/sp/initSSO.php
index c6d178036..55ca0efc0 100644
--- a/www/saml2/sp/initSSO.php
+++ b/www/saml2/sp/initSSO.php
@@ -1,11 +1,20 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 $session = SimpleSAML_Session::getInstance();
 
+SimpleSAML_Logger::warning('The file saml2/sp/initSSO.php is deprecated and will be removed in future versions.');
 
 SimpleSAML_Logger::info('SAML2.0 - SP.initSSO: Accessing SAML 2.0 SP initSSO script');
 
diff --git a/www/saml2/sp/metadata.php b/www/saml2/sp/metadata.php
index 947194685..8d2f2a73a 100644
--- a/www/saml2/sp/metadata.php
+++ b/www/saml2/sp/metadata.php
@@ -1,11 +1,21 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 /* Load simpleSAMLphp, configuration and metadata */
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file saml2/sp/metadata.php is deprecated and will be removed in future versions.');
+
 
 if (!$config->getValue('enable.saml20-sp', TRUE))
 	throw new SimpleSAML_Error_Error('NOACCESS');
diff --git a/www/shib13/sp/AssertionConsumerService.php b/www/shib13/sp/AssertionConsumerService.php
index 6d04f8ca1..9e59d0ac7 100644
--- a/www/shib13/sp/AssertionConsumerService.php
+++ b/www/shib13/sp/AssertionConsumerService.php
@@ -1,9 +1,19 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 
+SimpleSAML_Logger::warning('The file shib13/sp/AssertionConsumerService.php is deprecated and will be removed in future versions.');
+
 $session = SimpleSAML_Session::getInstance();
 
 
diff --git a/www/shib13/sp/idpdisco.php b/www/shib13/sp/idpdisco.php
index b9c563e08..85822edd0 100644
--- a/www/shib13/sp/idpdisco.php
+++ b/www/shib13/sp/idpdisco.php
@@ -1,7 +1,17 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
+SimpleSAML_Logger::warning('The file shib13/sp/idpdisco.php is deprecated and will be removed in future versions.');
+
 try {
 	$discoHandler = new SimpleSAML_XHTML_IdPDisco(array('shib13-idp-remote'), 'shib13');
 } catch (Exception $exception) {
diff --git a/www/shib13/sp/initSSO.php b/www/shib13/sp/initSSO.php
index 5d40daae2..de5f74eca 100644
--- a/www/shib13/sp/initSSO.php
+++ b/www/shib13/sp/initSSO.php
@@ -1,10 +1,19 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file shib13/sp/initSSO.php is deprecated and will be removed in future versions.');
 
 $session = SimpleSAML_Session::getInstance();
 		
diff --git a/www/shib13/sp/metadata.php b/www/shib13/sp/metadata.php
index 2bc4f8733..4f3d2dbf4 100644
--- a/www/shib13/sp/metadata.php
+++ b/www/shib13/sp/metadata.php
@@ -1,11 +1,20 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 /* Load simpleSAMLphp, configuration and metadata */
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file shib13/sp/metadata.php is deprecated and will be removed in future versions.');
 
 if (!$config->getBoolean('enable.shib13-sp', false))
 	throw new SimpleSAML_Error_Error('NOACCESS');
diff --git a/www/wsfed/sp/idpdisco.php b/www/wsfed/sp/idpdisco.php
index fe6f0b6a9..f48f9c9ea 100644
--- a/www/wsfed/sp/idpdisco.php
+++ b/www/wsfed/sp/idpdisco.php
@@ -1,7 +1,17 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
+SimpleSAML_Logger::warning('The file wsfed/sp/idpdisco.php is deprecated and will be removed in future versions.');
+
 try {
 	$discoHandler = new SimpleSAML_XHTML_IdPDisco(array('wsfed-idp-remote'), 'wsfed');
 } catch (Exception $exception) {
diff --git a/www/wsfed/sp/initSLO.php b/www/wsfed/sp/initSLO.php
index 318bfa2fe..001d8fb74 100644
--- a/www/wsfed/sp/initSLO.php
+++ b/www/wsfed/sp/initSLO.php
@@ -1,9 +1,19 @@
 <?php
 
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 require_once('../../_include.php');
 
 $config = SimpleSAML_Configuration::getInstance();
 
+SimpleSAML_Logger::warning('The file wsfed/sp/initSLO.php is deprecated and will be removed in future versions.');
+
 $session = SimpleSAML_Session::getInstance();
 
 SimpleSAML_Logger::info('WS-Fed - SP.initSLO: Accessing WS-Fed SP initSLO script');
diff --git a/www/wsfed/sp/initSSO.php b/www/wsfed/sp/initSSO.php
index f3f1ec7d7..a55d6aac4 100644
--- a/www/wsfed/sp/initSSO.php
+++ b/www/wsfed/sp/initSSO.php
@@ -1,4 +1,13 @@
 <?php
+
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 /**
  * WS-Federation/ADFS PRP protocol support for simpleSAMLphp.
  *
@@ -16,6 +25,8 @@ require_once('../../_include.php');
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file wsfed/sp/initSSO.php is deprecated and will be removed in future versions.');
+
 SimpleSAML_Logger::info('WS-Fed - SP.initSSO: Accessing WS-Fed SP initSSO script');
 
 if (!$config->getBoolean('enable.wsfed-sp', false))
diff --git a/www/wsfed/sp/prp.php b/www/wsfed/sp/prp.php
index 56b9b2496..606222b26 100644
--- a/www/wsfed/sp/prp.php
+++ b/www/wsfed/sp/prp.php
@@ -1,4 +1,13 @@
 <?php
+
+/**
+ * WARNING:
+ *
+ * THIS FILE IS DEPRECATED AND WILL BE REMOVED IN FUTURE VERSIONS
+ *
+ * @deprecated
+ */
+
 /**
  * WS-Federation/ADFS PRP protocol support for simpleSAMLphp.
  *
@@ -18,6 +27,8 @@ $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
+SimpleSAML_Logger::warning('The file wsfed/sp/prp.php is deprecated and will be removed in future versions.');
+
 SimpleSAML_Logger::info('WS-Fed - SP.AssertionConsumerService: Accessing WS-Fed SP endpoint AssertionConsumerService');
 
 if (!$config->getBoolean('enable.wsfed-sp', false))
-- 
GitLab