File: attributequery.php

package info (click to toggle)
simplesamlphp 1.19.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,920 kB
  • sloc: php: 202,044; javascript: 14,867; xml: 2,700; sh: 225; perl: 82; makefile: 70; python: 5
file content (77 lines) | stat: -rw-r--r-- 2,248 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?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($attributes === null || 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>
<button type="submit" name="send" class="btn">Send query</button>
</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');