Skip to content
Snippets Groups Projects
Commit f2d0bc85 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Adding openid auth source in config template and added initopenid script

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@891 44740490-163a-0410-bde0-09ae8108e29a
parent 725838cc
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,11 @@ $config = array(
'eduPersonAffiliation' => array('member', 'employee'),
'cn' => array('Test User'),
),
// Requires you to enable the OpenID module.
'openid' => array(
'openid:OpenIDConsumer',
),
'example-userpass' => array(
'exampleauth:UserPass',
......
<?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 (empty($_REQUEST['RelayState'])) {
SimpleSAML_Utilities::fatalError($session->getTrackID(), 'NORELAYSTATE');
}
if (! $session->isValid('openid') ) {
/* Authenticate with an AuthSource. */
$hints = array();
if (array_key_exists('openid', $_REQUEST)) $hints['openid'] = $_REQUEST['openid'];
SimpleSAML_Auth_Default::initLogin('openid', $_REQUEST['RelayState'], NULL, $hints);
}
?>
\ 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