From 08fa312ccea06c258ec91013973303b7d53c4d1e Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Wed, 21 Oct 2015 14:31:06 +0200 Subject: [PATCH] Deprecate the 'userid.attribute' option. We should define specific options for each module using it, in order to avoid confussions. --- lib/SimpleSAML/Auth/ProcessingChain.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php index b034220d9..fdf1ba96a 100644 --- a/lib/SimpleSAML/Auth/ProcessingChain.php +++ b/lib/SimpleSAML/Auth/ProcessingChain.php @@ -184,6 +184,7 @@ class SimpleSAML_Auth_ProcessingChain { try { + // TODO: remove this in SSP 2.0 if (!array_key_exists('UserID', $state)) { /* No unique user ID present. Attempt to add one. */ self::addUserID($state); @@ -283,6 +284,7 @@ class SimpleSAML_Auth_ProcessingChain { $state[self::FILTERS_INDEX] = $this->filters; + // TODO: remove this in SSP 2.0 if (!array_key_exists('UserID', $state)) { /* No unique user ID present. Attempt to add one. */ self::addUserID($state); @@ -313,11 +315,7 @@ class SimpleSAML_Auth_ProcessingChain { /** - * Add unique user ID. - * - * This function attempts to add an unique user ID to the state. - * - * @param array &$state The state we should update. + * @deprecated This method will be removed in SSP 2.0. */ private static function addUserID(&$state) { assert('is_array($state)'); @@ -325,8 +323,10 @@ class SimpleSAML_Auth_ProcessingChain { if (isset($state['Destination']['userid.attribute'])) { $attributeName = $state['Destination']['userid.attribute']; + SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated."); } elseif (isset($state['Source']['userid.attribute'])) { $attributeName = $state['Source']['userid.attribute']; + SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated."); } else { /* Default attribute. */ $attributeName = 'eduPersonPrincipalName'; -- GitLab