canaille-globuzma/canaille/templates/oidc/admin/token_view.html

154 lines
6.1 KiB
HTML
Raw Normal View History

{% extends theme('base.html') %}
2023-03-28 18:37:16 +00:00
{% import 'macro/form.html' as fui %}
2020-08-26 14:27:08 +00:00
{%- block title -%}
{%- trans %}Token details{% endtrans -%}
{%- endblock -%}
2023-03-10 00:02:36 +00:00
2023-02-03 17:43:13 +00:00
{% block script %}
2023-06-26 16:00:58 +00:00
<script src="/static/js/confirm.js" defer></script>
<script src="/static/js/copy.js" defer></script>
2023-02-03 17:43:13 +00:00
{% endblock %}
2023-03-15 16:27:32 +00:00
{% block submenu %}
<nav class="ui bottom attached five item borderless menu">
<a class="item" href="{{ url_for('admin.mail_index') }}">
<i class="user mail icon"></i>
{% trans %}Emails{% endtrans %}
</a>
<a class="item" href="{{ url_for('oidc.clients.index') }}">
<i class="th list icon"></i>
{% trans %}Clients{% endtrans %}
</a>
<a class="item" href="{{ url_for('oidc.clients.add') }}">
<i class="plus icon"></i>
{% trans %}Add a client{% endtrans %}
</a>
<a class="active item" href="{{ url_for('oidc.tokens.index') }}">
<i class="key icon"></i>
{% trans %}Tokens{% endtrans %}
</a>
<a class="item" href="{{ url_for('oidc.authorizations.index') }}">
<i class="user secret icon"></i>
{% trans %}Codes{% endtrans %}
</a>
</nav>
{% endblock %}
2020-08-26 14:27:08 +00:00
{% block content %}
2023-02-04 17:41:49 +00:00
<div id="modal-delete" class="ui basic modal">
<div class="ui icon header">
<i class="trash icon"></i>
{% trans %}Token deletion{% endtrans %}
</div>
<div class="content">
<p>
{{ _("Are you sure you want to revoke this token? This action is unrevokable.") }}
</p>
</div>
<div class="actions">
<div class="ui inverted cancel button">{% trans %}Cancel{% endtrans %}</div>
<div class="ui inverted red approve button">{% trans %}Delete{% endtrans %}</div>
</div>
</div>
2021-12-20 22:57:27 +00:00
<div class="loginform">
<h3 class="ui top attached header">
2023-02-04 17:41:49 +00:00
{% trans %}Token details{% endtrans %}
2021-12-20 22:57:27 +00:00
</h3>
2020-10-31 17:22:24 +00:00
2021-12-20 22:57:27 +00:00
<div class="ui attached clearing segment">
2022-02-03 08:51:04 +00:00
<table class="ui celled striped table">
<tr>
<td>{{ _("Client") }}</td>
<td>
2023-06-29 10:15:12 +00:00
<a href="{{ url_for("oidc.clients.edit", client=token.client) }}">
{{ token.client.client_name }}
2022-02-03 08:51:04 +00:00
</a>
</td>
</tr>
<tr>
<td>{{ _("Subject") }}</td>
<td>
2023-06-28 15:56:49 +00:00
<a href="{{ url_for("account.profile_edition", edited_user=token.subject) }}">
2023-07-01 17:08:56 +00:00
{{ token.subject.identifier }}
2022-02-03 08:51:04 +00:00
</a>
</td>
</tr>
<tr>
<td>{{ _("Scope") }}</td>
<td>
<ul class="ui list">
{% for scope in token.scope %}
<li class="item">{{ scope }}</li>
{% endfor %}
</ul>
</td>
</tr>
<tr>
<td>{{ _("Audience") }}</td>
<td>
<ul class="ui list">
{% for client in token.audience %}
2022-02-03 08:51:04 +00:00
<li class="item">
2023-06-29 10:15:12 +00:00
<a href="{{ url_for("oidc.clients.edit", client=client) }}">
2022-10-17 15:49:52 +00:00
{{ client.client_name }}
2022-02-03 08:51:04 +00:00
</a>
</li>
{% endfor %}
</ul>
</td>
</tr>
2023-02-04 17:41:49 +00:00
<tr>
<td>{{ _("Issue date") }}</td>
<td>{{ token.issue_date }}</td>
</tr>
<tr>
<td>{{ _("Expiration date") }}</td>
<td>{{ token.expire_date }}</td>
</tr>
2022-02-03 08:51:04 +00:00
<tr>
<td>{{ _("Revokation date") }}</td>
2023-02-04 17:41:49 +00:00
<td>
{% if token.revokation_date %}
{{ token.revokation_date }}
{% else %}
2023-06-29 10:15:12 +00:00
<a href="{{ url_for("oidc.tokens.revoke", token=token) }}" class="ui negative right floated button confirm" name="action" value="delete" id="delete">
2023-02-04 17:41:49 +00:00
{% trans %}Revoke token{% endtrans %}
</a>
<p>
{% trans %}This token has not been revoked{% endtrans %}
</p>
{% endif %}
</td>
2022-02-03 08:51:04 +00:00
</tr>
<tr>
<td>{{ _("Token type") }}</td>
<td>{{ token.type }}</td>
</tr>
<tr>
<td>{{ _("Access token") }}</td>
2023-02-03 17:43:13 +00:00
<td class="ui fluid action input">
<input type="text" value="{{ token.access_token }}" readonly class="copy-text" id="access-token" data-copy="access-token">
<button class="ui primary right labeled icon button copy-button" data-copy="access-token">
<i class="copy icon"></i>
{% trans %}Copy{% endtrans %}
2023-03-17 21:27:58 +00:00
</button>
</td>
</tr>
2022-02-03 08:51:04 +00:00
2023-03-17 21:27:58 +00:00
<tr>
<td>{{ _("Refresh token") }}</td>
<td class="ui fluid action input">
<input type="text" value="{{ token.refresh_token }}" readonly class="copy-text" id="refresh-token" data-copy="refresh-token">
<button class="ui primary right labeled icon button copy-button" data-copy="refresh-token">
<i class="copy icon"></i>
{% trans %}Copy{% endtrans %}
</button>
</td>
</tr>
</table>
</div>
</div>
2020-08-26 14:27:08 +00:00
{% endblock %}