-
Notifications
You must be signed in to change notification settings - Fork 703
Expand file tree
/
Copy pathauth_status.twig
More file actions
118 lines (91 loc) · 3.78 KB
/
auth_status.twig
File metadata and controls
118 lines (91 loc) · 3.78 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{% set pagetitle = 'Authentication status'|trans %}
{% extends 'base.twig' %}
{% block content %}
<h2>{{ pagetitle }}</h2>
<p>{% trans %}Hi, this is the status page of SimpleSAMLphp. Here you can see if your session is timed out, how long it lasts until it times out and all the attributes that are attached to your session.{% endtrans %}</p>
{% if remaining %}
<p>{% trans with {
'%remaining%': remaining
} %}Your session is valid for %remaining% seconds from now.{% endtrans %}</p>
{% endif %}
<h2>{{ 'Your attributes'|trans }}</h2>
{% set items = attributes %}
{% embed '_table.twig' -%}
{% block namecol %}
{% set translated = name|trans %}
<td class="attrname">{% if translated != name %}{{ translated }}<br>{% endif %}<samp>{{ name }}</samp></td>
{% endblock %}
{% block value -%}
{% if name =='jpegPhoto'-%}
<img src="data:image/jpeg;base64,{{ value }}" />
{% else %}{{ value }}{% endif -%}
{% endblock -%}
{%- endembed %}
{% if nameid %}
<h2>{{ 'SAML Subject'|trans }}</h2>
{% set items = {'NameId' : nameid.value} %}
{% if not nameid.value %}
{% set items = items|merge({'NameID' : 'not set'|trans}) %}
{% endif %}
{% if nameid.Format %}
{% set items = items|merge({('Format'|trans) : nameid.Format}) %}
{% endif %}
{% if nameid.NameQualifier %}
{% set items = items|merge({'NameQualifier' : nameid.NameQualifier}) %}
{% endif %}
{% if nameid.SPNameQualifier %}
{% set items = items|merge({'SPNameQualifier' : nameid.SPNameQualifier}) %}
{% endif %}
{% if nameid.SPProvidedID %}
{% set items = items|merge({'SPProvidedID' : nameid.SPProvidedID}) %}
{% endif %}
<table id="table_with_attributes" class="attributes pure-table pure-table-striped pure-table-attributes" summary="attribute overview">
{% for name, value in items %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td class="attrname">{{ name }}</td>
<td class="attrvalue">{{ value }}</td>
</tr>
{% endfor %}
</table><br>
{% endif %}
<dl>
<dt>{% trans %}Debug information to be used by your support staff{% endtrans %}</dt>
<dd>{%- embed "includes/expander.twig" %}
{%- block content %}
<dl>
<dd>{% trans %}Tracking number{% endtrans %}</dd>
<dd class="code-box hljs">
<div class="pure-button-group top-right-corner">
<a class="pure-button copy hljs" data-clipboard-target="#trackid"
title="{% trans %}Copy to clipboard{% endtrans %}"><span class="fa fa-copy"></span></a>
</div>
<code id="trackid" class="code-box-content">{{ trackid }}</code>
</dd>
{%- if authData %}
<dd>{% trans %}Information about your current session{% endtrans %}</dd>
<dd class="code-box hljs">
<div class="pure-button-group top-right-corner">
<a class="pure-button copy hljs" data-clipboard-target="#authdata"
title="{% trans %}Copy to clipboard{% endtrans %}"><span class="fa fa-copy"></span></a>
</div>
<div id="authdata" class="code-box-content php">
{{- authData|json_encode(constant('JSON_UNESCAPED_SLASHES') b-or constant('JSON_PRETTY_PRINT')) |raw -}}
</div>
</dd>
{%- endif %}
</dl>
{%- endblock content %}
{%- endembed %}
</dd>
</dl>
<br>
{% if logout is defined %}
<h2>{% trans %}Logout{% endtrans %}</h2>
<p> {{ logout }}</p>
{% endif %}
{% if logouturl is defined %}
<div class="center">
<a class="pure-button pure-button-red" href="{{ logouturl }}">{{ 'Logout'|trans }}</a>
</div>
{% endif %}
{% endblock %}