PHP Classes

File: web/SSO/templates/attributequery.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/templates/attributequery.php   Download  
File: web/SSO/templates/attributequery.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 2,225 bytes
 

Contents

Class file image Download
<?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'); ?>