Skip to content
Snippets Groups Projects
Commit a4377301 authored by Menco Bolt's avatar Menco Bolt Committed by Tim van Dijen
Browse files

Add authData (#1106)

parent b260aebe
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,8 @@ class Controller
}
$attributes = $auth->getAttributes();
$session = Session::getSessionFromRequest();
$t = new Template($this->config, 'auth_status.twig', 'attributes');
$l = $t->getLocalization();
......@@ -91,6 +93,8 @@ class Controller
$t->data['nameid'] = !is_null($auth->getAuthData('saml:sp:NameID'))
? $auth->getAuthData('saml:sp:NameID')
: false;
$t->data['authData'] = $auth->getAuthDataArray();
$t->data['trackid'] = $session->getTrackID();
$t->data['logouturl'] = Module::getModuleURL('core/logout/'.urlencode($as));
$t->data['remaining'] = $this->session->getAuthData($as, 'Expire') - time();
$t->setStatusCode(200);
......
......@@ -67,6 +67,40 @@
{% endif %}
<dl>
<dt>{% trans %}Debug information to be used by your support staff{% endtrans %}</dt>
{%- 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 %}
</dl>
<br>
{% if logout %}
<h2>{% trans %}Logout{% endtrans %}</h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment