public function getList($set = 'saml20-idp-remote')
{
assert('is_string($set)');
$result = array();
foreach ($this->sources as $source) {
$srcList = $source->getMetadataSet($set);
foreach ($srcList as $key => $le) {
if (array_key_exists('expire', $le)) {
if ($le['expire'] < time()) {
unset($srcList[$key]);
SimpleSAML\Logger::warning("Dropping metadata entity " . var_export($key, true) . ", expired " . SimpleSAML\Utils\Time::generateTimestamp($le['expire']) . ".");
}
}
}
/* $result is the last argument to array_merge because we want the content already
* in $result to have precedence.
*/
$result = array_merge($srcList, $result);
}
return $result;
}
/** * Retrieve the list of IdPs which are stored in the metadata. * * @return array An array with entityid => metadata mappings. */ protected function getIdPList() { $idpList = array(); foreach ($this->metadataSets as $metadataSet) { $newList = $this->metadata->getList($metadataSet); /* * Note that we merge the entities in reverse order. This ensures that it is the entity in the first * metadata set that "wins" if two metadata sets have the same entity. */ $idpList = array_merge($newList, $idpList); } return $idpList; }