Add missing attributequery example template.

git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@2401 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
olavmrk 2010-07-09 11:41:55 +00:00
parent 4431bcb2ef
commit f8ad27656d
1 changed files with 81 additions and 0 deletions

View File

@ -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'); ?>