Revision: 1726
Author: olavmrk
Date: Fri Aug 28 00:47:42 2009
Log: authsource-test: Add list of authentication sources.
http://code.google.com/p/simplesamlphp/source/detail?r=1726
Added:
/trunk/modules/core/templates/authsource_list.tpl.php
Modified:
/trunk/modules/core/www/authenticate.php
=======================================
--- /dev/null
+++ /trunk/modules/core/templates/authsource_list.tpl.php Fri Aug 28
00:47:42 2009
@@ -0,0 +1,21 @@
+<?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');
+?>
=======================================
--- /trunk/modules/core/www/authenticate.php Thu Aug 27 07:05:39 2009
+++ /trunk/modules/core/www/authenticate.php Fri Aug 28 00:47:42 2009
@@ -26,7 +26,11 @@
}
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'];
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en
-~----------~----~----~----~------~----~------~--~---