Skip to content
Snippets Groups Projects
Commit 08fa312c authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Deprecate the 'userid.attribute' option. We should define specific options for...

Deprecate the 'userid.attribute' option. We should define specific options for each module using it, in order to avoid confussions.
parent b083f6d3
No related branches found
No related tags found
No related merge requests found
...@@ -184,6 +184,7 @@ class SimpleSAML_Auth_ProcessingChain { ...@@ -184,6 +184,7 @@ class SimpleSAML_Auth_ProcessingChain {
try { try {
// TODO: remove this in SSP 2.0
if (!array_key_exists('UserID', $state)) { if (!array_key_exists('UserID', $state)) {
/* No unique user ID present. Attempt to add one. */ /* No unique user ID present. Attempt to add one. */
self::addUserID($state); self::addUserID($state);
...@@ -283,6 +284,7 @@ class SimpleSAML_Auth_ProcessingChain { ...@@ -283,6 +284,7 @@ class SimpleSAML_Auth_ProcessingChain {
$state[self::FILTERS_INDEX] = $this->filters; $state[self::FILTERS_INDEX] = $this->filters;
// TODO: remove this in SSP 2.0
if (!array_key_exists('UserID', $state)) { if (!array_key_exists('UserID', $state)) {
/* No unique user ID present. Attempt to add one. */ /* No unique user ID present. Attempt to add one. */
self::addUserID($state); self::addUserID($state);
...@@ -313,11 +315,7 @@ class SimpleSAML_Auth_ProcessingChain { ...@@ -313,11 +315,7 @@ class SimpleSAML_Auth_ProcessingChain {
/** /**
* Add unique user ID. * @deprecated This method will be removed in SSP 2.0.
*
* This function attempts to add an unique user ID to the state.
*
* @param array &$state The state we should update.
*/ */
private static function addUserID(&$state) { private static function addUserID(&$state) {
assert('is_array($state)'); assert('is_array($state)');
...@@ -325,8 +323,10 @@ class SimpleSAML_Auth_ProcessingChain { ...@@ -325,8 +323,10 @@ class SimpleSAML_Auth_ProcessingChain {
if (isset($state['Destination']['userid.attribute'])) { if (isset($state['Destination']['userid.attribute'])) {
$attributeName = $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'])) { } elseif (isset($state['Source']['userid.attribute'])) {
$attributeName = $state['Source']['userid.attribute']; $attributeName = $state['Source']['userid.attribute'];
SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated.");
} else { } else {
/* Default attribute. */ /* Default attribute. */
$attributeName = 'eduPersonPrincipalName'; $attributeName = 'eduPersonPrincipalName';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment