Skip to content
Snippets Groups Projects
Commit 63ab6ca3 authored by Olav Morken's avatar Olav Morken
Browse files

Session: Reintroduce get_sp_list().

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2321 44740490-163a-0410-bde0-09ae8108e29a
parent c33f241b
No related branches found
No related tags found
No related merge requests found
......@@ -1021,6 +1021,37 @@ class SimpleSAML_Session {
$this->dirty = TRUE;
}
/**
* Get a list of associated SAML 2 SPs.
*
* This function is just for backwards-compatibility. New code should
* use the SimpleSAML_IdP::getAssociations()-function.
*
* @return array Array of SAML 2 entitiyIDs.
* @deprecated Will be removed in the future.
*/
public function get_sp_list() {
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
try {
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = SimpleSAML_IdP::getById('saml2:' . $idpEntityId);
} catch (Exception $e) {
/* No SAML 2 IdP configured? */
return arrray();
}
$ret = array();
foreach ($idp->getAssociations() as $assoc) {
if (isset($assoc['saml:entityID'])) {
$ret[] = $assoc['saml:entityID'];
}
}
return $ret;
}
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment