2require_once(
'../_include.php');
9if (!empty($_FILES[
'xmlfile'][
'tmp_name'])) {
10 $xmldata = trim(file_get_contents($_FILES[
'xmlfile'][
'tmp_name']));
11} elseif (array_key_exists(
'xmldata',
$_POST)) {
12 $xmldata = trim(
$_POST[
'xmldata']);
15if (!empty($xmldata)) {
20 foreach ($entities as &$entity) {
22 'shib13-sp-remote' => $entity->getMetadata1xSP(),
23 'shib13-idp-remote' => $entity->getMetadata1xIdP(),
24 'saml20-sp-remote' => $entity->getMetadata20SP(),
25 'saml20-idp-remote' => $entity->getMetadata20IdP(),
35 foreach ($entities as
$entityId => $entityMetadata) {
37 if ($entityMetadata ===
null) {
42 unset($entityMetadata[
'entityDescriptor']);
45 var_export($entityMetadata,
true).
";\n";
An exception for terminatinating execution or to throw for unit testing.
static transpose($array)
This function transposes a two-dimensional array, so that $a['k1']['k2'] becomes $a['k2']['k1'].
static requireAdmin()
Require admin access to the current page.
static checkSAMLMessage($message, $type)
This function performs some sanity checks on XML documents, and optionally validates them against the...
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.