Revision: 1840
Author: olavmrk
Date: Sun Oct 11 23:37:01 2009
Log: saml: Restructure code to get correct error message for invalid  
entityID.
http://code.google.com/p/simplesamlphp/source/detail?r=1840

Modified:
  /trunk/modules/saml/lib/Auth/Source/SP.php

=======================================
--- /trunk/modules/saml/lib/Auth/Source/SP.php  Thu Oct  8 02:55:07 2009
+++ /trunk/modules/saml/lib/Auth/Source/SP.php  Sun Oct 11 23:37:01 2009
@@ -47,15 +47,15 @@
                /* Call the parent constructor first, as required by the 
interface. */
                parent::__construct($info, $config);

-               /* For compatibility with code that assumes that  
$metadata->getString('entityid') gives the entity id. */
-               if (array_key_exists('entityID', $config)) {
-                       $config['entityid'] = $config['entityID'];
-               } else {
-                       $config['entityid'] = $this->getMetadataURL();
-               }
+               if (!array_key_exists('entityID', $config)) {
+                       $config['entityID'] = $this->getMetadataURL();
+               }
+
+               /* For compatibility with code that assumes that  
$metadata->getString('entityid') gives the entity id. */
+               $config['entityid'] = $config['entityID'];

                $this->metadata =  
SimpleSAML_Configuration::loadFromArray($config, 'authsources[' .  
var_export($this->authId, TRUE) . ']');
-               $this->entityId = $this->metadata->getString('entityid');
+               $this->entityId = $this->metadata->getString('entityID');
                $this->idp = $this->metadata->getString('idp', NULL);
                $this->discoURL = $this->metadata->getString('discoURL', NULL);
        }

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to