Skip to content

Commit

Permalink
Merge pull request NIIF#1 from shingo78/fix/saml2-4.x-issues
Browse files Browse the repository at this point in the history
Fix saml2 4.x issues
  • Loading branch information
shingo78 authored Mar 15, 2022
2 parents 653466e + ae38a68 commit 94281f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "simplesamlphp-module",
"require": {
"simplesamlphp/composer-module-installer": "~1.1",
"simplesamlphp/saml2": ">=3.0",
"simplesamlphp/saml2": ">=4.0, <4.2.8",
"ext-soap": "*"
},
"require-dev": {
Expand Down
13 changes: 6 additions & 7 deletions lib/Auth/Process/attributeaggregator.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,12 @@ public function process(&$state)
// build attribute query
$query = new \SAML2\AttributeQuery();
$query->setDestination($this->aaEndpoint);
$query->setIssuer($this->selfMetadata->getValue('entityID'));
$nameid = \SAML2\XML\saml\NameID::fromArray (
array(
'Value' => $state['Attributes'][$this->attributeId][0],
'Format' => $this->nameIdFormat,
)
);
$issuer = new \SAML2\XML\saml\Issuer();
$issuer->setValue($this->selfMetadata->getValue('entityID'));
$query->setIssuer($issuer);
$nameid = new \SAML2\XML\saml\NameID();
$nameid->setValue($state['Attributes'][$this->attributeId][0]);
$nameid->setFormat($this->nameIdFormat);
$query->setNameId($nameid);
$query->setAttributeNameFormat($this->attributeNameFormat);
$query->setAttributes($this->getRequestedAttributes()); // may be empty, then it's a noop
Expand Down

0 comments on commit 94281f0

Please sign in to comment.