Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit bd68d22

Browse files
committed
- Fix method stringify in StringifyTargetedID.php to be compatible with SimpleSAMLphp 1.18.0+
- Using getters to get private properties
1 parent d4d36e9 commit bd68d22

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
#### Changed
66
- UserExtSources are now updated asynchronously
77

8+
#### Fixed
9+
- Fix method stringify in StringifyTargetedID.php to be compatible with SimpleSAMLphp 1.18.0+
10+
- Using getters to get private properties
11+
812
## [v3.6.0]
913
#### Added
1014
- Added method getFacilityByEntityId

lib/Auth/Process/StringifyTargetedID.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace SimpleSAML\Module\perun\Auth\Process;
44

5+
use SAML2\XML\saml\NameID;
6+
use SimpleSAML\Auth\ProcessingFilter;
57
use SimpleSAML\Error\Exception;
68

79
/**
@@ -16,7 +18,7 @@
1618
* @author Ondrej Velisek <[email protected]>
1719
*/
1820

19-
class StringifyTargetedID extends \SimpleSAML\Auth\ProcessingFilter
21+
class StringifyTargetedID extends ProcessingFilter
2022
{
2123
private $uidAttr;
2224
private $targetAttr;
@@ -52,12 +54,16 @@ public function process(&$request)
5254

5355
/**
5456
* Convert NameID value into the text representation.
57+
*
58+
* @param NameID $attributeValue
59+
*
60+
* @return NameID|string
5561
*/
56-
private function stringify($attributeValue)
62+
private function stringify(NameID $attributeValue)
5763
{
5864
if (is_object($attributeValue) && get_class($attributeValue) === 'SAML2\XML\saml\NameID') {
59-
return $attributeValue->NameQualifier . '!' . $attributeValue->SPNameQualifier . '!'
60-
. $attributeValue->value;
65+
return $attributeValue->getNameQualifier() . '!' . $attributeValue->getSPNameQualifier() . '!'
66+
. $attributeValue->getValue();
6167
} else {
6268
return $attributeValue;
6369
}

0 commit comments

Comments
 (0)