This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathauth_status.twig
82 lines (59 loc) · 2.41 KB
/
auth_status.twig
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
{% 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 %}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 attr = ('{attributes:attribute_'~(name|lower)~'}') %}
{% set translated = attr|trans %}
<td class="attrname">{% if translated != attr %} {{ 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 %}
{% if logout %}
<h2>{% trans %}Logout{% endtrans %}</h2>
<p> {{ logout }}</p>
{% endif %}
{% if logouturl %}
<div class="center">
<a class="pure-button pure-button-red" href="{{ logouturl }}">{{ 'Logout'|trans }}</a>
</div>
{% endif %}
{% endblock %}