summaryrefslogtreecommitdiffstats
path: root/inc/simplesamlphp/templates
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2013-06-07 10:19:28 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2013-06-07 10:19:28 (GMT)
commit148696b03f7679dbb4d10caf1c03b40b00294bc6 (patch)
tree099a7906d27653c9bb31dfc8accd768285f75395 /inc/simplesamlphp/templates
parentbf196f5d5d1b87bab633394aca23d77b43621d4e (diff)
downloadspip-saml-148696b03f7679dbb4d10caf1c03b40b00294bc6.zip
spip-saml-148696b03f7679dbb4d10caf1c03b40b00294bc6.tar.gz
spip-saml-148696b03f7679dbb4d10caf1c03b40b00294bc6.tar.bz2
include simplesamlphp and fix sso
Diffstat (limited to 'inc/simplesamlphp/templates')
-rw-r--r--inc/simplesamlphp/templates/attributequery.php81
-rw-r--r--inc/simplesamlphp/templates/error.php72
-rw-r--r--inc/simplesamlphp/templates/errorreport.php9
-rw-r--r--inc/simplesamlphp/templates/includes/footer-embed.php2
-rw-r--r--inc/simplesamlphp/templates/includes/footer.php28
-rw-r--r--inc/simplesamlphp/templates/includes/header-embed.php23
-rw-r--r--inc/simplesamlphp/templates/includes/header.php219
-rw-r--r--inc/simplesamlphp/templates/login-ldapmulti.php71
-rw-r--r--inc/simplesamlphp/templates/login.php68
-rw-r--r--inc/simplesamlphp/templates/logout.php20
-rw-r--r--inc/simplesamlphp/templates/metadata-converter.php43
-rw-r--r--inc/simplesamlphp/templates/metadata.php51
-rw-r--r--inc/simplesamlphp/templates/post.php70
-rw-r--r--inc/simplesamlphp/templates/selectidp-dropdown.php57
-rw-r--r--inc/simplesamlphp/templates/selectidp-links.php86
-rw-r--r--inc/simplesamlphp/templates/status.php118
16 files changed, 1018 insertions, 0 deletions
diff --git a/inc/simplesamlphp/templates/attributequery.php b/inc/simplesamlphp/templates/attributequery.php
new file mode 100644
index 0000000..9eb276b
--- /dev/null
+++ b/inc/simplesamlphp/templates/attributequery.php
@@ -0,0 +1,81 @@
+<?php
+$this->includeAtTemplateBase('includes/header.php');
+
+$dataId = $this->data['dataId'];
+assert('is_string($dataId)');
+
+$url = $this->data['url'];
+assert('is_string($url)');
+
+$nameIdFormat = $this->data['nameIdFormat'];
+assert('is_string($nameIdFormat)');
+
+$nameIdValue = $this->data['nameIdValue'];
+assert('is_string($nameIdValue)');
+
+$nameIdQualifier = $this->data['nameIdQualifier'];
+assert('is_string($nameIdQualifier)');
+
+$nameIdSPQualifier = $this->data['nameIdSPQualifier'];
+assert('is_string($nameIdSPQualifier)');
+
+
+$attributes = $this->data['attributes'];
+assert('is_null($attributes) || is_array($attributes)');
+
+
+?>
+
+<h2>Attribute query test</h2>
+
+<p>This is a test page for sending an AttributeQuery message.</p>
+
+<h3>Request</h3>
+
+<form action="?" method="post">
+<input name="dataId" type="hidden" value="<?php echo htmlspecialchars($dataId); ?>" />
+<p>
+<label for="url">URL of attribute query endpoint:</label><br />
+<input name="url" type="text" size="80" value="<?php echo htmlspecialchars($url); ?>" />
+</p>
+<p>
+<label for="nameIdFormat">NameID format:</label><br />
+<input name="nameIdFormat" type="text" size="80" value="<?php echo htmlspecialchars($nameIdFormat); ?>" />
+</p>
+
+<p>
+<label for="nameIdValue">NameID value:</label><br />
+<input name="nameIdValue" type="text" size="80" value="<?php echo htmlspecialchars($nameIdValue); ?>" />
+</p>
+
+<p>
+<label for="nameIdQualifier">NameID NameQualifier (optional):</label><br />
+<input name="nameIdQualifier" type="text" size="80" value="<?php echo htmlspecialchars($nameIdQualifier); ?>" />
+</p>
+
+<p>
+<label for="nameIdSPQualifier">NameID SPNameQualifier (optional):</label><br />
+<input name="nameIdSPQualifier" type="text" size="80" value="<?php echo htmlspecialchars($nameIdSPQualifier); ?>" />
+</p>
+
+<p>
+<input type="submit" name="send" value="Send query" />
+</p>
+</form>
+
+<?php
+if ($attributes !== NULL) {
+
+ echo('<h3>Attributes received</h3><dl>');
+ foreach ($attributes as $name => $values) {
+ echo('<dt>' . htmlspecialchars($name) . '</dt><dd><ul>');
+ foreach ($values as $value) {
+ echo('<li>' . htmlspecialchars($value) . '</li>');
+ }
+ echo('</dd>');
+ }
+ echo('</dl>');
+}
+?>
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/error.php b/inc/simplesamlphp/templates/error.php
new file mode 100644
index 0000000..b4358af
--- /dev/null
+++ b/inc/simplesamlphp/templates/error.php
@@ -0,0 +1,72 @@
+<?php
+ $this->data['header'] = $this->t($this->data['dictTitle']);
+
+ $this->data['head'] = '
+<meta name="robots" content="noindex, nofollow" />
+<meta name="googlebot" content="noarchive, nofollow" />';
+
+ $this->includeAtTemplateBase('includes/header.php');
+?>
+
+ <h2><?php echo $this->t($this->data['dictTitle']); ?></h2>
+
+<?php
+echo htmlspecialchars($this->t($this->data['dictDescr'], $this->data['parameters']));
+
+/* Include optional information for error. */
+if (isset($this->data['includeTemplate'])) {
+ $this->includeAtTemplateBase($this->data['includeTemplate']);
+}
+?>
+
+ <div class="trackidtext">
+ <?php echo $this->t('report_trackid'); ?>
+ <span class="trackid"><?php echo $this->data['error']['trackId']; ?></span>
+ </div>
+
+
+<?php
+/* Print out exception only if the exception is available. */
+if ($this->data['showerrors']) {
+?>
+ <h2><?php echo $this->t('debuginfo_header'); ?></h2>
+ <p><?php echo $this->t('debuginfo_text'); ?></p>
+
+ <div style="border: 1px solid #eee; padding: 1em; font-size: x-small">
+ <p style="margin: 1px"><?php echo htmlspecialchars($this->data['error']['exceptionMsg']); ?></p>
+ <pre style=" padding: 1em; font-family: monospace; "><?php echo htmlspecialchars($this->data['error']['exceptionTrace']); ?></pre>
+ </div>
+<?php
+}
+?>
+
+<?php
+/* Add error report submit section if we have a valid technical contact. 'errorreportaddress' will only be set if
+ * the technical contact email address has been set.
+ */
+if (isset($this->data['errorReportAddress'])) {
+?>
+
+ <h2><?php echo $this->t('report_header'); ?></h2>
+ <form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
+
+ <p><?php echo $this->t('report_text'); ?></p>
+ <p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" /></p>
+
+ <p>
+ <textarea name="text" rows="6" cols="43"><?php echo $this->t('report_explain'); ?></textarea>
+ </p><p>
+ <input type="hidden" name="reportId" value="<?php echo $this->data['error']['reportId']; ?>" />
+ <input type="submit" name="send" value="<?php echo $this->t('report_submit'); ?>" />
+ </p>
+ </form>
+<?php
+}
+?>
+
+<h2 style="clear: both"><?php echo $this->t('howto_header'); ?></h2>
+
+<p><?php echo $this->t('howto_text'); ?></p>
+
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/errorreport.php b/inc/simplesamlphp/templates/errorreport.php
new file mode 100644
index 0000000..c6d22cc
--- /dev/null
+++ b/inc/simplesamlphp/templates/errorreport.php
@@ -0,0 +1,9 @@
+<?php
+ $this->data['header'] = $this->t('errorreport_header');
+ $this->includeAtTemplateBase('includes/header.php');
+?>
+
+
+<h2><?php echo $this->t('errorreport_header'); ?></h2>
+<p><?php echo $this->t('errorreport_text'); ?></p>
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/includes/footer-embed.php b/inc/simplesamlphp/templates/includes/footer-embed.php
new file mode 100644
index 0000000..308b1d0
--- /dev/null
+++ b/inc/simplesamlphp/templates/includes/footer-embed.php
@@ -0,0 +1,2 @@
+</body>
+</html>
diff --git a/inc/simplesamlphp/templates/includes/footer.php b/inc/simplesamlphp/templates/includes/footer.php
new file mode 100644
index 0000000..2837497
--- /dev/null
+++ b/inc/simplesamlphp/templates/includes/footer.php
@@ -0,0 +1,28 @@
+<?php
+
+
+
+if(!empty($this->data['htmlinject']['htmlContentPost'])) {
+ foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
+ echo $c;
+ }
+}
+
+
+?>
+
+
+
+ <hr />
+
+ <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/ssplogo-fish-small.png" alt="Small fish logo" style="float: right" />
+ Copyright &copy; 2007-2010 <a href="http://rnd.feide.no/">Feide RnD</a>
+
+ <br style="clear: right" />
+
+ </div><!-- #content -->
+
+</div><!-- #wrap -->
+
+</body>
+</html> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/includes/header-embed.php b/inc/simplesamlphp/templates/includes/header-embed.php
new file mode 100644
index 0000000..dce6cba
--- /dev/null
+++ b/inc/simplesamlphp/templates/includes/header-embed.php
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title><?php
+if(array_key_exists('header', $this->data)) {
+ echo $this->data['header'];
+} else {
+ echo 'simpleSAMLphp';
+}
+?></title>
+
+ <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default.css" />
+ <meta name="robots" content="noindex, nofollow" />
+
+<?php
+if(array_key_exists('head', $this->data)) {
+ echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
+}
+?>
+</head>
+<body>
+
diff --git a/inc/simplesamlphp/templates/includes/header.php b/inc/simplesamlphp/templates/includes/header.php
new file mode 100644
index 0000000..6d2e5fc
--- /dev/null
+++ b/inc/simplesamlphp/templates/includes/header.php
@@ -0,0 +1,219 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?php
+
+
+
+/**
+ * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
+ */
+$this->data['htmlinject'] = array(
+ 'htmlContentPre' => array(),
+ 'htmlContentPost' => array(),
+ 'htmlContentHead' => array(),
+);
+
+
+$jquery = array();
+if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery'];
+
+if (array_key_exists('pageid', $this->data)) {
+ $hookinfo = array(
+ 'pre' => &$this->data['htmlinject']['htmlContentPre'],
+ 'post' => &$this->data['htmlinject']['htmlContentPost'],
+ 'head' => &$this->data['htmlinject']['htmlContentHead'],
+ 'jquery' => &$jquery,
+ 'page' => $this->data['pageid']
+ );
+
+ SimpleSAML_Module::callHooks('htmlinject', $hookinfo);
+}
+// - o - o - o - o - o - o - o - o - o - o - o - o -
+
+/**
+ * Do not allow to frame simpleSAMLphp pages from another location.
+ * This prevents clickjacking attacks in modern browsers.
+ *
+ * If you don't want any framing at all you can even change this to
+ * 'DENY', or comment it out if you actually want to allow foreign
+ * sites to put simpleSAMLphp in a frame. The latter is however
+ * probably not a good security practice.
+ */
+header('X-Frame-Options: SAMEORIGIN');
+
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<script type="text/javascript" src="/<?php echo $this->data['baseurlpath']; ?>resources/script.js"></script>
+<title><?php
+if(array_key_exists('header', $this->data)) {
+ echo $this->data['header'];
+} else {
+ echo 'simpleSAMLphp';
+}
+?></title>
+
+ <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default.css" />
+ <link rel="icon" type="image/icon" href="/<?php echo $this->data['baseurlpath']; ?>resources/icons/favicon.ico" />
+
+<?php
+
+if(!empty($jquery)) {
+ $version = '1.5';
+ if (array_key_exists('version', $jquery))
+ $version = $jquery['version'];
+
+ if ($version == '1.5') {
+ if (isset($jquery['core']) && $jquery['core'])
+ echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery.js"></script>' . "\n");
+
+ if (isset($jquery['ui']) && $jquery['ui'])
+ echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui.js"></script>' . "\n");
+
+ if (isset($jquery['css']) && $jquery['css'])
+ echo('<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] .
+ 'resources/uitheme/jquery-ui-themeroller.css" />' . "\n");
+
+ } else if ($version == '1.6') {
+ if (isset($jquery['core']) && $jquery['core'])
+ echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-16.js"></script>' . "\n");
+
+ if (isset($jquery['ui']) && $jquery['ui'])
+ echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui-16.js"></script>' . "\n");
+
+ if (isset($jquery['css']) && $jquery['css'])
+ echo('<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] .
+ 'resources/uitheme16/ui.all.css" />' . "\n");
+ }
+}
+
+if(!empty($this->data['htmlinject']['htmlContentHead'])) {
+ foreach($this->data['htmlinject']['htmlContentHead'] AS $c) {
+ echo $c;
+ }
+}
+
+
+
+
+if ($this->isLanguageRTL()) {
+?>
+ <link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default-rtl.css" />
+<?php
+}
+?>
+
+
+ <meta name="robots" content="noindex, nofollow" />
+
+
+<?php
+if(array_key_exists('head', $this->data)) {
+ echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
+}
+?>
+</head>
+<?php
+$onLoad = '';
+if(array_key_exists('autofocus', $this->data)) {
+ $onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
+}
+if (isset($this->data['onLoad'])) {
+ $onLoad .= $this->data['onLoad'];
+}
+
+if($onLoad !== '') {
+ $onLoad = ' onload="' . $onLoad . '"';
+}
+?>
+<body<?php echo $onLoad; ?>>
+
+<div id="wrap">
+
+ <div id="header">
+ <h1><a style="text-decoration: none; color: white" href="/<?php echo $this->data['baseurlpath']; ?>"><?php
+ echo (isset($this->data['header']) ? $this->data['header'] : 'simpleSAMLphp');
+ ?></a></h1>
+ </div>
+
+
+ <?php
+
+ $includeLanguageBar = TRUE;
+ if (!empty($_POST))
+ $includeLanguageBar = FALSE;
+ if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE)
+ $includeLanguageBar = FALSE;
+
+ if ($includeLanguageBar) {
+
+
+ echo '<div id="languagebar">';
+ $languages = $this->getLanguageList();
+ $langnames = array(
+ 'no' => 'Bokmål',
+ 'nn' => 'Nynorsk',
+ 'se' => 'Sámegiella',
+ 'sam' => 'Åarjelh-saemien giele',
+ 'da' => 'Dansk',
+ 'en' => 'English',
+ 'de' => 'Deutsch',
+ 'sv' => 'Svenska',
+ 'fi' => 'Suomeksi',
+ 'es' => 'Español',
+ 'fr' => 'Français',
+ 'it' => 'Italiano',
+ 'nl' => 'Nederlands',
+ 'lb' => 'Luxembourgish',
+ 'cs' => 'Czech',
+ 'sl' => 'Slovenščina', // Slovensk
+ 'lt' => 'Lietuvių kalba', // Lithuanian
+ 'hr' => 'Hrvatski', // Croatian
+ 'hu' => 'Magyar', // Hungarian
+ 'pl' => 'Język polski', // Polish
+ 'pt' => 'Português', // Portuguese
+ 'pt-br' => 'Português brasileiro', // Portuguese
+ 'ru' => 'русский язык', // Russian
+ 'et' => 'eesti keel',
+ 'tr' => 'Türkçe',
+ 'el' => 'ελληνικά',
+ 'ja' => '日本語',
+ 'zh' => '简体中文', // Chinese (simplified)
+ 'zh-tw' => '繁體中文', // Chinese (traditional)
+ 'ar' => 'العربية', // Arabic
+ 'fa' => 'پارسی', // Persian
+ 'ur' => 'اردو', // Urdu
+ 'he' => 'עִבְרִית', // Hebrew
+ 'id' => 'Bahasa Indonesia', // Indonesian
+ 'sr' => 'Srpski',
+ );
+
+ $textarray = array();
+ foreach ($languages AS $lang => $current) {
+ $lang = strtolower($lang);
+ if ($current) {
+ $textarray[] = $langnames[$lang];
+ } else {
+ $textarray[] = '<a href="' . htmlspecialchars(SimpleSAML_Utilities::addURLparameter(SimpleSAML_Utilities::selfURL(), array('language' => $lang))) . '">' .
+ $langnames[$lang] . '</a>';
+ }
+ }
+ echo join(' | ', $textarray);
+ echo '</div>';
+
+ }
+
+
+
+ ?>
+ <div id="content">
+
+
+
+<?php
+
+if(!empty($this->data['htmlinject']['htmlContentPre'])) {
+ foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
+ echo $c;
+ }
+}
diff --git a/inc/simplesamlphp/templates/login-ldapmulti.php b/inc/simplesamlphp/templates/login-ldapmulti.php
new file mode 100644
index 0000000..61a01ab
--- /dev/null
+++ b/inc/simplesamlphp/templates/login-ldapmulti.php
@@ -0,0 +1,71 @@
+<?php
+ $this->includeAtTemplateBase('includes/header.php');
+?>
+
+
+ <?php if (isset($this->data['error'])) { ?>
+ <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
+ <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px " />
+ <h2><?php echo $this->t('error_header'); ?></h2>
+
+ <p><?php echo htmlspecialchars($this->data['error']); ?> </p>
+ </div>
+ <?php } ?>
+
+ <h2 style="break: both"><?php echo $this->t('user_pass_header'); ?></h2>
+
+ <p>
+ <?php echo $this->t('user_pass_text'); ?>
+ </p>
+
+ <form action="?" method="post" name="f">
+
+ <table>
+ <tr>
+ <td rowspan="3"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /></td>
+ <td style="padding: .3em;"><?php echo $this->t('username'); ?></td>
+ <td><input type="text" tabindex="1" name="username"
+ <?php if (isset($this->data['username'])) {
+ echo 'value="' . htmlspecialchars($this->data['username']) . '"';
+ } ?> /></td>
+
+
+ <td style="padding: .4em;" rowspan="3">
+ <input type="submit" tabindex="3" value="Login" />
+ <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td style="padding: .3em;"><?php echo $this->t('organization'); ?></td>
+ <td><select name="org" tabindex="2">
+ <?php
+
+ foreach ($this->data['ldapconfig'] AS $key => $entry) {
+ echo '<option ' .
+ ($key == $this->data['org'] ? 'selected="selected" ' : '')
+ . 'value="' . htmlspecialchars($key) . '">' . htmlspecialchars($entry['description']) . '</option>';
+ }
+
+ ?>
+ </select></td>
+ </tr>
+
+ <tr>
+ <td style="padding: .3em;"><?php echo $this->t('password'); ?></td>
+ <td><input type="password" tabindex="2" name="password" /></td>
+ </tr>
+ </table>
+
+
+ </form>
+
+
+ <h2><?php echo $this->t('help_header'); ?>.</h2>
+
+
+ <p><?php echo $this->t('help_text'); ?>!</p>
+
+
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/login.php b/inc/simplesamlphp/templates/login.php
new file mode 100644
index 0000000..a7081b7
--- /dev/null
+++ b/inc/simplesamlphp/templates/login.php
@@ -0,0 +1,68 @@
+<?php
+ if (!isset($this->data['autofocus'])) {
+ $this->data['autofocus'] = 'username';
+ }
+ $this->includeAtTemplateBase('includes/header.php');
+?>
+
+ <?php if (isset($this->data['error'])) { ?>
+ <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
+ <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png" class="float-l" style="margin: 15px " />
+ <h2><?php echo $this->t('error_header'); ?></h2>
+
+ <p><?php echo $this->t($this->data['error']); ?> </p>
+ </div>
+ <?php } ?>
+
+ <h2 style="break: both"><?php echo $this->t('user_pass_header'); ?></h2>
+
+ <p><?php echo $this->t('user_pass_text'); ?></p>
+
+ <form action="?" method="post" name="f">
+
+ <table>
+ <tr>
+ <td rowspan="2"><img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-authentication.48x48.png" /></td>
+ <td style="padding: .3em;"><?php echo $this->t('username'); ?></td>
+
+
+ <td>
+ <?php
+
+ if (array_key_exists('admin', $this->data)) {
+ echo '<strong style="font-size: medium">Administrator</strong>';
+ } else {
+
+ echo '<input type="text" id="username" tabindex="1" name="username" ';
+ if (isset($this->data['username'])) {
+ echo 'value="' . htmlspecialchars($this->data['username']) . '"';
+ }
+ echo '/>';
+ }
+
+
+ ?>
+ </td>
+
+ <td style="padding: .4em;" rowspan="2">
+ <input type="submit" tabindex="3" value="<?php echo $this->t('login_button'); ?>" />
+ <input type="hidden" name="RelayState" value="<?php echo htmlspecialchars($this->data['relaystate']); ?>" />
+ </td>
+ </tr>
+ <tr>
+ <td style="padding: .3em;"><?php echo $this->t('password'); ?></td>
+ <td><input id="password" type="password" tabindex="2" name="password" /></td>
+ </tr>
+ </table>
+
+
+ </form>
+
+
+ <h2><?php echo $this->t('help_header'); ?></h2>
+
+
+ <p><?php echo $this->t('help_text'); ?></p>
+
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/logout.php b/inc/simplesamlphp/templates/logout.php
new file mode 100644
index 0000000..8ce3f71
--- /dev/null
+++ b/inc/simplesamlphp/templates/logout.php
@@ -0,0 +1,20 @@
+<?php
+
+$this->data['header'] = $this->t('{logout:title}');
+
+$this->includeAtTemplateBase('includes/header.php');
+
+
+
+echo('<h2>' . $this->data['header'] . '</h2>');
+echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>');
+
+if($this->getTag($this->data['text']) !== NULL) {
+ $this->data['text'] = $this->t($this->data['text']);
+}
+echo('<p>[ <a href="' . htmlspecialchars($this->data['link']) . '">' .
+ htmlspecialchars($this->data['text']) . '</a> ]</p>');
+
+$this->includeAtTemplateBase('includes/footer.php');
+
+?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/metadata-converter.php b/inc/simplesamlphp/templates/metadata-converter.php
new file mode 100644
index 0000000..f8b17c1
--- /dev/null
+++ b/inc/simplesamlphp/templates/metadata-converter.php
@@ -0,0 +1,43 @@
+<?php
+$this->data['header'] = $this->t('metaconv_title');
+$this->includeAtTemplateBase('includes/header.php');
+?>
+
+
+
+<h2><?php echo $this->t('metaconv_title'); ?></h2>
+
+<form action="?" method="post">
+
+<p><?php echo($this->t('{admin:metaconv_xmlmetadata}')); ?></p>
+<p>
+<textarea rows="20" cols="120" name="xmldata"><?php echo htmlspecialchars($this->data['xmldata']); ?></textarea>
+</p>
+<p>
+<input type="submit" value="<?php echo $this->t('metaconv_parse'); ?>" />
+</p>
+</form>
+
+<?php
+
+$output = $this->data['output'];
+
+if($output !== NULL) {
+
+ echo('<h2>' . $this->t('metaconv_converted') . '</h2>' . "\n");
+
+ foreach($output as $type => $text) {
+ if($text === '') {
+ continue;
+ }
+
+ echo('<h3>' . htmlspecialchars($type) . '</h3>' . "\n");
+ echo('<pre class="metadatabox">' . htmlspecialchars($text) . '</pre>' . "\n");
+ }
+}
+
+?>
+
+<?php
+$this->includeAtTemplateBase('includes/footer.php');
+?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/metadata.php b/inc/simplesamlphp/templates/metadata.php
new file mode 100644
index 0000000..3d2ca52
--- /dev/null
+++ b/inc/simplesamlphp/templates/metadata.php
@@ -0,0 +1,51 @@
+<?php
+$this->data['header'] = $this->t('metadata_' . $this->data['header']);
+$this->includeAtTemplateBase('includes/header.php');
+?>
+
+
+ <h2><?php echo $this->data['header']; ?></h2>
+
+ <p><?php echo $this->t('metadata_intro'); ?></p>
+
+ <?php if (isset($this->data['metaurl'])) { ?>
+ <p><?php echo($this->t('metadata_xmlurl', array('%METAURL%' => htmlspecialchars($this->data['metaurl'])))); ?><br />
+ <input type="text" style="width: 90%" value="<?php echo htmlspecialchars($this->data['metaurl']); ?>" /></p>
+ <?php } ?>
+ <h2><?php echo($this->t('metadata_metadata')); ?></h2>
+
+ <p><?php echo($this->t('metadata_xmlformat')); ?></p>
+
+ <pre class="metadatabox"><?php echo $this->data['metadata']; ?>
+</pre>
+
+
+ <p><?php echo($this->t('metadata_simplesamlformat')); ?></p>
+
+ <pre class="metadatabox"><?php echo $this->data['metadataflat']; ?>
+</pre>
+
+
+<?php
+if(array_key_exists('available_certs', $this->data)) { ?>
+ <h2><?php echo($this->t('metadata_cert')); ?></h2>
+ <p><?php echo($this->t('metadata_cert_intro')); ?></p>
+ <ul>
+ <?php
+ foreach(array_keys($this->data['available_certs']) as $certName) {
+ echo ('<li><a href="'.
+ htmlspecialchars(SimpleSAML_Module::getModuleURL('saml/idp/certs.php').'/'.$certName).'">'.$certName.'</a>');
+ if($this->data['available_certs'][$certName]['certFingerprint'][0] == 'afe71c28ef740bc87425be13a2263d37971da1f9') {
+ echo ('&nbsp; <img style="display: inline;" src="/' . $this->data['baseurlpath'] .
+ 'resources/icons/silk/exclamation.png" alt="default certificate" />
+ This is the default certificate. Generate a new certificate if this is a production system.');
+ }
+ echo '</li>';
+ }
+ echo '</ul>';
+}
+?>
+
+
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/post.php b/inc/simplesamlphp/templates/post.php
new file mode 100644
index 0000000..323c39c
--- /dev/null
+++ b/inc/simplesamlphp/templates/post.php
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>POST data</title>
+</head>
+<body onload="document.getElementsByTagName('input')[0].click();">
+
+ <noscript>
+ <p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the button below once to proceed.</p>
+ </noscript>
+
+ <form method="post" action="<?php echo htmlspecialchars($this->data['destination']); ?>">
+ <!-- Need to add this element and call click method, because calling submit()
+ on the form causes failed submission if the form has another element with name or id of submit.
+ See: https://developer.mozilla.org/en/DOM/form.submit#Specification -->
+ <input type="submit" style="display:none;" />
+<?php
+if (array_key_exists('post', $this->data)) {
+ $post = $this->data['post'];
+} else {
+ /* For backwards compatibility. */
+ assert('array_key_exists("response", $this->data)');
+ assert('array_key_exists("RelayStateName", $this->data)');
+ assert('array_key_exists("RelayState", $this->data)');
+
+ $post = array(
+ 'SAMLResponse' => $this->data['response'],
+ $this->data['RelayStateName'] => $this->data['RelayState'],
+ );
+}
+
+/**
+ * Write out one or more INPUT elements for the given name-value pair.
+ *
+ * If the value is a string, this function will write a single INPUT element.
+ * If the value is an array, it will write multiple INPUT elements to
+ * recreate the array.
+ *
+ * @param string $name The name of the element.
+ * @param string|array $value The value of the element.
+ */
+function printItem($name, $value) {
+ assert('is_string($name)');
+ assert('is_string($value) || is_array($value)');
+
+ if (is_string($value)) {
+ echo '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />';
+ return;
+ }
+
+ /* This is an array... */
+ foreach ($value as $index => $item) {
+ printItem($name . '[' . $index . ']', $item);
+ }
+}
+
+foreach ($post as $name => $value) {
+ printItem($name, $value);
+}
+?>
+
+ <noscript>
+ <input type="submit" value="Submit" />
+ </noscript>
+ </form>
+
+</body>
+</html> \ No newline at end of file
diff --git a/inc/simplesamlphp/templates/selectidp-dropdown.php b/inc/simplesamlphp/templates/selectidp-dropdown.php
new file mode 100644
index 0000000..c7aaa1c
--- /dev/null
+++ b/inc/simplesamlphp/templates/selectidp-dropdown.php
@@ -0,0 +1,57 @@
+<?php
+
+if(!array_key_exists('header', $this->data)) {
+ $this->data['header'] = 'selectidp';
+}
+$this->data['header'] = $this->t($this->data['header']);
+
+$this->data['autofocus'] = 'dropdownlist';
+
+$this->includeAtTemplateBase('includes/header.php');
+
+foreach ($this->data['idplist'] AS $idpentry) {
+ if (isset($idpentry['name'])) {
+ $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']);
+ } elseif (isset($idpentry['OrganizationDisplayName'])) {
+ $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']);
+ }
+ if (isset($idpentry['description']))
+ $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']);
+}
+
+
+?>
+
+ <h2><?php echo $this->data['header']; ?></h2>
+
+ <p><?php echo $this->t('selectidp_full'); ?></p>
+
+ <form method="get" action="<?php echo $this->data['urlpattern']; ?>">
+ <input type="hidden" name="entityID" value="<?php echo htmlspecialchars($this->data['entityID']); ?>" />
+ <input type="hidden" name="return" value="<?php echo htmlspecialchars($this->data['return']); ?>" />
+ <input type="hidden" name="returnIDParam" value="<?php echo htmlspecialchars($this->data['returnIDParam']); ?>" />
+ <select id="dropdownlist" name="idpentityid">
+ <?php
+
+ foreach ($this->data['idplist'] AS $idpentry) {
+
+ echo '<option value="'.htmlspecialchars($idpentry['entityid']).'"';
+ if (isset($this->data['preferredidp']) &&
+ $idpentry['entityid'] == $this->data['preferredidp'])
+ echo ' selected="selected"';
+
+ echo '>'.htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])).'</option>';
+
+ }
+ ?>
+ </select>
+ <input type="submit" value="<?php echo $this->t('select'); ?>"/>
+ <?php
+ if($this->data['rememberenabled']) {
+ echo('<br/><input type="checkbox" name="remember" value="1" />' . $this->t('remember'));
+ }
+ ?>
+ </form>
+
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
diff --git a/inc/simplesamlphp/templates/selectidp-links.php b/inc/simplesamlphp/templates/selectidp-links.php
new file mode 100644
index 0000000..85aa3ca
--- /dev/null
+++ b/inc/simplesamlphp/templates/selectidp-links.php
@@ -0,0 +1,86 @@
+<?php
+
+if(!array_key_exists('header', $this->data)) {
+ $this->data['header'] = 'selectidp';
+}
+$this->data['header'] = $this->t($this->data['header']);
+
+$this->data['autofocus'] = 'preferredidp';
+
+$this->includeAtTemplateBase('includes/header.php');
+
+foreach ($this->data['idplist'] AS $idpentry) {
+ if (isset($idpentry['name'])) {
+ $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']);
+ } elseif (isset($idpentry['OrganizationDisplayName'])) {
+ $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']);
+ }
+ if (isset($idpentry['description']))
+ $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']);
+}
+
+
+?>
+
+
+ <h2><?php echo $this->data['header']; ?></h2>
+
+ <form method="get" action="<?php echo $this->data['urlpattern']; ?>">
+ <input type="hidden" name="entityID" value="<?php echo htmlspecialchars($this->data['entityID']); ?>" />
+ <input type="hidden" name="return" value="<?php echo htmlspecialchars($this->data['return']); ?>" />
+ <input type="hidden" name="returnIDParam" value="<?php echo htmlspecialchars($this->data['returnIDParam']); ?>" />
+
+ <p><?php
+ echo $this->t('selectidp_full');
+ if($this->data['rememberenabled']) {
+ echo('<br /><input type="checkbox" name="remember" value="1" title="'.$this->t('remember').'" />' . $this->t('remember'));
+ }
+ ?></p>
+
+ <?php
+
+
+ if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $this->data['idplist'])) {
+ $idpentry = $this->data['idplist'][$this->data['preferredidp']];
+ echo '<div class="preferredidp">';
+ echo ' <img src="/' . $this->data['baseurlpath'] .'resources/icons/experience/gtk-about.64x64.png" class="float-r" alt="'.$this->t('icon_prefered_idp').'" />';
+
+ if(array_key_exists('icon', $idpentry) && $idpentry['icon'] !== NULL) {
+ $iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']);
+ echo '<img class="float-l" style="margin: 1em; padding: 3px; border: 1px solid #999" src="' . htmlspecialchars($iconUrl) . '" />';
+ }
+ echo "\n" . ' <h3 style="margin-top: 8px">' . htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>';
+
+ if (!empty($idpentry['description'])) {
+ echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />';
+ }
+ echo('<input id="preferredidp" type="submit" name="idp_' .
+ htmlspecialchars($idpentry['entityid']) . '" value="' .
+ $this->t('select') . '" /></p>');
+ echo '</div>';
+ }
+
+
+ foreach ($this->data['idplist'] AS $idpentry) {
+ if ($idpentry['entityid'] != $this->data['preferredidp']) {
+
+ if(array_key_exists('icon', $idpentry) && $idpentry['icon'] !== NULL) {
+ $iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']);
+ echo '<img class="float-l" style="clear: both; margin: 1em; padding: 3px; border: 1px solid #999" src="' . htmlspecialchars($iconUrl) . '" />';
+ }
+ echo "\n" . ' <h3 style="margin-top: 8px">' . htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>';
+
+ if (!empty($idpentry['description'])) {
+
+ echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />';
+ }
+ echo('<input type="submit" name="idp_' .
+ htmlspecialchars($idpentry['entityid']) . '" value="' .
+ $this->t('select') . '" /></p>');
+ }
+ }
+
+ ?>
+ </form>
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
diff --git a/inc/simplesamlphp/templates/status.php b/inc/simplesamlphp/templates/status.php
new file mode 100644
index 0000000..9f369d6
--- /dev/null
+++ b/inc/simplesamlphp/templates/status.php
@@ -0,0 +1,118 @@
+<?php
+if(array_key_exists('header', $this->data)) {
+ if($this->getTag($this->data['header']) !== NULL) {
+ $this->data['header'] = $this->t($this->data['header']);
+ }
+}
+
+$this->includeAtTemplateBase('includes/header.php');
+?>
+
+<h2><?php if (isset($this->data['header'])) { echo($this->data['header']); } else { echo($this->t('{status:some_error_occurred}')); } ?></h2>
+
+<p><?php echo($this->t('{status:intro}')); ?></p>
+
+<?php
+if (isset($this->data['remaining'])) {
+ echo('<p>' . $this->t('{status:validfor}', array('%SECONDS%' => $this->data['remaining'])) . '</p>');
+}
+
+if(isset($this->data['sessionsize'])) {
+ echo('<p>' . $this->t('{status:sessionsize}', array('%SIZE%' => $this->data['sessionsize'])) . '</p>');
+}
+?>
+
+<h2><?php echo($this->t('{status:attributes_header}')); ?></h2>
+
+<?php
+// consent style listing start
+$attributes = $this->data['attributes'];
+
+function present_list($attr) {
+ if (is_array($attr) && count($attr) > 1) {
+ $str = '<ul>';
+ foreach ($attr as $value) {
+ $str .= '<li>' . htmlspecialchars($attr) . '</li>';
+ }
+ $str .= '</ul>';
+ return $str;
+ } else {
+ return htmlspecialchars($attr[0]);
+ }
+}
+
+function present_assoc($attr) {
+ if (is_array($attr)) {
+
+ $str = '<dl>';
+ foreach ($attr AS $key => $value) {
+ $str .= "\n" . '<dt>' . htmlspecialchars($key) . '</dt><dd>' . present_list($value) . '</dd>';
+ }
+ $str .= '</dl>';
+ return $str;
+ } else {
+ return htmlspecialchars($attr);
+ }
+}
+
+function present_attributes($t, $attributes, $nameParent) {
+ $alternate = array('odd', 'even'); $i = 0;
+
+ $parentStr = (strlen($nameParent) > 0)? strtolower($nameParent) . '_': '';
+ $str = (strlen($nameParent) > 0)? '<table class="attributes" summary="attribute overview">':
+ '<table id="table_with_attributes" class="attributes" summary="attribute overview">';
+
+ foreach ($attributes as $name => $value) {
+
+ $nameraw = $name;
+ $name = $t->getAttributeTranslation($parentStr . $nameraw);
+
+ if (preg_match('/^child_/', $nameraw)) {
+ $parentName = preg_replace('/^child_/', '', $nameraw);
+ foreach($value AS $child) {
+ $str .= '<tr class="odd"><td colspan="2" style="padding: 2em">' . present_attributes($t, $child, $parentName) . '</td></tr>';
+ }
+ } else {
+ if (sizeof($value) > 1) {
+ $str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">' . htmlspecialchars($name) . '</td><td class="attrvalue"><ul>';
+ foreach ($value AS $listitem) {
+ if ($nameraw === 'jpegPhoto') {
+ $str .= '<li><img src="data:image/jpeg;base64,' . htmlspecialchars($listitem) . '" /></li>';
+ } else {
+ $str .= '<li>' . present_assoc($listitem) . '</li>';
+ }
+ }
+ $str .= '</ul></td></tr>';
+ } elseif(isset($value[0])) {
+ $str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">' . htmlspecialchars($name) . '</td>';
+ if ($nameraw === 'jpegPhoto') {
+ $str .= '<td class="attrvalue"><img src="data:image/jpeg;base64,' . htmlspecialchars($value[0]) . '" /></td></tr>';
+ } else {
+ $str .= '<td class="attrvalue">' . htmlspecialchars($value[0]) . '</td></tr>';
+ }
+ }
+ }
+ $str .= "\n";
+ }
+ $str .= '</table>';
+ return $str;
+}
+
+echo(present_attributes($this, $attributes, ''));
+// consent style listing end
+
+if (isset($this->data['logout'])) {
+ echo('<h2>' . $this->t('{status:logout}') . '</h2>');
+ echo('<p>' . $this->data['logout'] . '</p>');
+}
+
+if (isset($this->data['logouturl'])) {
+ echo('<h2>' . $this->t('{status:logout}') . '</h2>');
+ echo('<p>[ <a href="' . htmlspecialchars($this->data['logouturl']) . '">' . $this->t('{status:logout}') . '</a> ]</p>');
+}
+?>
+
+ <h2><?php echo $this->t('{core:frontpage:about_header}'); ?></h2>
+ <p><?php echo $this->t('{core:frontpage:about_text}'); ?></p>
+
+<?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file