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

openid: Remove test page.

The user may as well test with the "test configured authentication
sources" link.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2560 44740490-163a-0410-bde0-09ae8108e29a
parent 749dc95d
No related branches found
No related tags found
No related merge requests found
<?php
/**
* Hook to add the modinfo module to the frontpage.
*
* @param array &$links The links on the frontpage, split into sections.
*/
function openid_hook_frontpage(&$links) {
assert('is_array($links)');
assert('array_key_exists("links", $links)');
$links['auth'][] = array(
'href' => SimpleSAML_Module::getModuleURL('openid/openidtest.php'),
'text' => '{openid:dictopenid:openidtestpage}',
);
}
?>
\ No newline at end of file
<?php
/**
* The _include script registers a autoloader for the simpleSAMLphp libraries. It also
* initializes the simpleSAMLphp config class with the correct path.
*/
require_once('_include.php');
/* Load simpleSAMLphp, configuration and metadata */
$config = SimpleSAML_Configuration::getInstance();
$session = SimpleSAML_Session::getInstance();
if (! $session->isValid('openid') ) {
/* Authenticate with an AuthSource. */
$hints = array('openid' => NULL);
SimpleSAML_Auth_Default::initLogin('openid', SimpleSAML_Utilities::selfURL(), NULL, $hints);
}
$attributes = $session->getAttributes();
$t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
$t->data['header'] = '{openid:dictopenid:openidtestpage}';
$t->data['remaining'] = $session->remainingTime();
$t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes;
$t->data['logouturl'] = NULL;
$t->show();
?>
\ 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