Esempio n. 1
0
 /**
  * Constructor for SAML SP authentication source.
  *
  * @param array $info  Information about this authentication source.
  * @param array $config  Configuration.
  */
 public function __construct($info, $config)
 {
     assert('is_array($info)');
     assert('is_array($config)');
     /* Call the parent constructor first, as required by the interface. */
     parent::__construct($info, $config);
     if (!isset($config['entityID'])) {
         $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->idp = $this->metadata->getString('idp', NULL);
     $this->discoURL = $this->metadata->getString('discoURL', NULL);
 }