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

aggregator: Add script to get metadata without going through web.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2518 44740490-163a-0410-bde0-09ae8108e29a
parent 8bdac645
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env php
<?php
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/lib/_autoload.php');
if ($argc < 2) {
fwrite(STDERR, "Missing aggregator id.\n");
exit(1);
}
$id = $argv[1];
$gConfig = SimpleSAML_Configuration::getConfig('module_aggregator.php');
$aggregators = $gConfig->getConfigItem('aggregators');
$aConfig = $aggregators->getConfigItem($id, NULL);
if ($aConfig === NULL) {
fwrite(STDERR, 'No aggregator with id ' . var_export($id, TRUE) . " found.\n");
exit(1);
}
$aggregator = new sspmod_aggregator_Aggregator($gConfig, $aConfig, $id);
$xml = $aggregator->getMetadataDocument();
echo($xml->saveXML());
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