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

authsource-test: Add list of authentication sources.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1726 44740490-163a-0410-bde0-09ae8108e29a
parent 7f3f502f
No related branches found
No related tags found
No related merge requests found
<?php
/**
* Template to show list of configured authentication sources.
*
*/
$this->data['header'] = 'Test authentication sources';
$this->includeAtTemplateBase('includes/header.php');
?>
<h1><?php echo $this->data['header']; ?></h1>
<ul>
<?php
foreach ($this->data['sources'] as $id) {
echo '<li><a href="?as=' . htmlspecialchars(urlencode($id)) . '">' . htmlspecialchars($id) . '</a></li>';
}
?>
</ul>
<?php
$this->includeAtTemplateBase('includes/footer.php');
?>
......@@ -26,7 +26,11 @@ if (array_key_exists(SimpleSAML_Auth_State::EXCEPTION_PARAM, $_REQUEST)) {
}
if(!array_key_exists('as', $_REQUEST)) {
throw new Exception('No authentication source chosen.');
$t = new SimpleSAML_XHTML_Template($config, 'core:authsource_list.tpl.php');
$t->data['sources'] = SimpleSAML_Auth_Source::getSources();
$t->show();
exit();
}
$as = $_REQUEST['as'];
......
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