Revision: 1988 Author: olavmrk Date: Fri Nov 13 01:16:53 2009 Log: SAML2_AuthnRequest: Move Scoping-element to after NameIDPolicy as per spec.
Merged into 1.5 branch from r1982. http://code.google.com/p/simplesamlphp/source/detail?r=1988 Modified: /branches/simplesamlphp-1.5/lib/SAML2/AuthnRequest.php ======================================= --- /branches/simplesamlphp-1.5/lib/SAML2/AuthnRequest.php Tue Sep 22 03:11:38 2009 +++ /branches/simplesamlphp-1.5/lib/SAML2/AuthnRequest.php Fri Nov 13 01:16:53 2009 @@ -270,18 +270,6 @@ if ($this->protocolBinding !== NULL) { $root->setAttribute('ProtocolBinding', $this->protocolBinding); } - - if (count($this->IDPList) > 0) { - $scoping = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'Scoping'); - $idplist = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'IDPList'); - foreach ($this->IDPList as $provider) { - $idpEntry = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'IDPEntry'); - $idpEntry->setAttribute('ProviderID', $provider); - $idplist->appendChild($idpEntry); - } - $scoping->appendChild($idplist); - $root->appendChild($scoping); - } if (!empty($this->nameIdPolicy)) { $nameIdPolicy = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'NameIDPolicy'); @@ -296,6 +284,18 @@ } $root->appendChild($nameIdPolicy); } + + if (count($this->IDPList) > 0) { + $scoping = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'Scoping'); + $idplist = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'IDPList'); + foreach ($this->IDPList as $provider) { + $idpEntry = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'IDPEntry'); + $idpEntry->setAttribute('ProviderID', $provider); + $idplist->appendChild($idpEntry); + } + $scoping->appendChild($idplist); + $root->appendChild($scoping); + } return $root; } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "simpleSAMLphp commits" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/simplesamlphp-commits?hl=en -~----------~----~----~----~------~----~------~--~---
