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

Added configuration options in config.php to enable and disable functionality....

Added configuration options in config.php to enable and disable functionality. Also made the front page of the installation dynamic depending on what functionality that is enabled.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@156 44740490-163a-0410-bde0-09ae8108e29a
parent d8feea61
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,19 @@ $config = array ( ...@@ -48,6 +48,19 @@ $config = array (
'logging.facility' => LOG_LOCAL5, 'logging.facility' => LOG_LOCAL5,
'logging.level' => LOG_NOTICE, 'logging.level' => LOG_NOTICE,
/*
* Enable
*
* Which functionality in simpleSAMLphp do you want to enable. Normally you would enable only
* one of the functionalities below, but in some cases you could run multiple functionalities.
* In example when you are setting up a federation bridge.
*/
'enable.saml20-sp' => true,
'enable.saml20-idp' => false,
'enable.shib13-sp' => false,
'enable.shib13-idp' => false,
'enable.openid-provider'=> false,
/* /*
* This value is the duration of the session in seconds. Make sure that the time duration of * This value is the duration of the session in seconds. Make sure that the time duration of
* cookies both at the SP and the IdP exceeds this duration. * cookies both at the SP and the IdP exceeds this duration.
...@@ -70,6 +83,18 @@ $config = array ( ...@@ -70,6 +83,18 @@ $config = array (
'default-saml20-idp' => 'max.feide.no', 'default-saml20-idp' => 'max.feide.no',
'default-shib13-idp' => 'urn:mace:switch.ch:aaitest:dukono.switch.ch', 'default-shib13-idp' => 'urn:mace:switch.ch:aaitest:dukono.switch.ch',
/*
* Meta data handler.
*
* Options: [flatfile,saml2xmlmeta]
*
*/
#'metadata.handler' => 'saml2xmlmeta',
'metadata.handler' => 'flatfile',
/* /*
* LDAP configuration. This is only relevant if you use the LDAP authentication plugin. * LDAP configuration. This is only relevant if you use the LDAP authentication plugin.
*/ */
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> require_once('_include.php');
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>simpleSAMLphp</title>
require_once('SimpleSAML/Utilities.php');
<style type="text/css"> require_once('SimpleSAML/Session.php');
require_once('SimpleSAML/XHTML/Template.php');
/* these styles are in the head of this page because this is a unique page */ require_once('SimpleSAML/XML/MetaDataStore.php');
/* THE BIG GUYS */ $config = SimpleSAML_Configuration::getInstance();
* {margin:0;padding:0}
body {text-align:center;padding: 20px 0;background: #222;color:#333;font:83%/1.5 arial,tahoma,verdana,sans-serif}
img {border:none;display:block} $session = SimpleSAML_Session::getInstance();
hr {margin: 1em 0;background:#eee;height:1px;color:#eee;border:none;clear:both}
/* LINKS */
a,a:link,a:link,a:link,a:hover {font-weight:bold;background:transparent;text-decoration:underline;cursor:pointer}
a:link {color:#c00}
a:visited {color:#999}
a:hover,a:active {color:#069}
/* LISTS */
ul {margin: .3em 0 1.5em 2em}
ul.related {margin-top:-1em}
li {margin-left:2em}
dt {font-weight:bold}
#wrap {border: 1px solid #fff;position:relative;background:#fff;width:600px;margin: 0 auto;text-align:left}
#header {background: #666 url("resources/sprites.gif") repeat-x 0 100%;margin: 0 0 25px;padding: 0 0 8px}
#header h1 {color:#fff;font-size: 145%;padding:20px 20px 12px}
#poweredby {width:96px;height:63px;position:absolute;top:0;right:0}
#content {padding: 0 20px}
/* TYPOGRAPHY */
p, ul, ol {margin: 0 0 1.5em}
h1, h2, h3, h4, h5, h6 {letter-spacing: -1px;font-family: arial,verdana,sans-serif;margin: 1.2em 0 .3em;color:#000;border-bottom: 1px solid #eee;padding-bottom: .1em}
h1 {font-size: 196%;margin-top:0;border:none}
h2 {font-size: 136%}
h3 {font-size: 126%}
h4 {font-size: 116%}
h5 {font-size: 106%}
h6 {font-size: 96%}
.old {text-decoration:line-through}
</style>
</head>
<body>
<div id="wrap">
<div id="header">
<h1>simpleSAMLphp is installed</h1>
<div id="poweredby"><img src="resources/icons/compass_l.png" alt="Bino" /></div>
</div>
<div id="content">
<h2>Welcome to simpleSAMlphp</h2>
<p>You have installed simpleSAMLphp on this web host.</p>
<p>After you have configured it properly as described in the documentation you may want to test one of the two examples:
<ul>
<li><a href="saml2/sp/metadata.php">Look at your SAML 2.0 SP metadata</a> - you can send this metadata document to your IdP.</a></li>
<li><a href="saml2/idp/metadata.php">Look at your SAML 2.0 IdP metadata</a></a></li>
<li><a href="example-simple/saml2-example.php">SAML 2.0 SP example</a></li>
<li><a href="example-simple/shib13-example.php">Shibboleth 1.3 SP example</a></li>
<li><a href="openid/provider/server.php">OpenID Provider site</a></li>
</ul>
</p>
<h2>Diagnostics</h2>
<p>Here are some help tools to diagnose what is wrong if things do not work as expected.</p>
<p>Misconfiguration of NameVirtualHosts and similar things are pretty common in Apache. simpleSAMLphp relies on getting correct information from Apache what relates to port number information about ssl and so on. Here is a diagnostics page that shows what simpleSAMLphp is getting from Apache:
<ul>
<li><a href="example-simple/hostnames.php">Diagnostics on hostname, port and protocol</a></li>
</ul>
</p>
<h2>About simpleSAMLphp</h2>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it?
You can find more information about simpleSAMLphp at <a href="http://rnd.feide.no">the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
<hr />
Copyright &copy; 2007 <a href="http://rnd.feide.no/">Feide RnD</a>
<hr />
</div> $links = array();
$links[] = array('href' => 'admin/metadata.php', 'text' => 'Meta data overview for your installation. Diagnose your meta data files.');
if ($config->getValue('enable.saml20-sp') === true)
$links[] = array('href' => 'saml2/sp/metadata.php', 'text' => 'SAML 2.0 Service Provider Metadata (automatically generated)');
if ($config->getValue('enable.saml20-sp') === true)
$links[] = array('href' => 'example-simple/saml2-example.php', 'text' => 'SAML 2.0 SP example - test logging in through your IdP');
if ($config->getValue('enable.saml20-idp') === true)
$links[] = array('href' => 'saml2/idp/metadata.php', 'text' => 'SAML 2.0 Identity Provider Metadata (automatically generated)');
if ($config->getValue('enable.shib13-sp') === true)
$links[] = array('href' => 'example-simple/shib13-example.php', 'text' => 'Shibboleth 1.3 SP example - test logging in through your Shib IdP');
if ($config->getValue('enable.openid-provider') === true)
$links[] = array('href' => 'openid/provider/server.php', 'text' => 'OpenID Provider site - Alpha version (test code)');
$t = new SimpleSAML_XHTML_Template($config, 'frontpage.php');
$t->data['header'] = 'simpleSAMLphp installation page';
$t->data['links'] = $links;
$t->show();
</div>
</body> ?>
</html> \ 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