{% extends "base_template.html" %} {% block title %}{{ _('API tokens') }}{% endblock %} {% block content %}
{{ _('Tokens let the splent command line act on your behalf. The token itself is shown once, when you create it, and is never stored here.') }}
| {{ _('Name') }} | {{ _('Token') }} | {{ _('Scopes') }} | {{ _('Created') }} | {{ _('Expires') }} | {{ _('Last used') }} | {{ _('State') }} | {# Pinned to the right in the panel (admin's panel.css), so Revoke stays in view on a phone. #}|
|---|---|---|---|---|---|---|---|
| {{ token.name }} | {{ token.prefix }}... |
{% for scope in token.scope_list %} {{ scope }} {% endfor %} | {{ token.created_at.strftime('%Y-%m-%d %H:%M') if token.created_at else '' }} | {% if token.expires_at %} {{ token.expires_at.strftime('%Y-%m-%d %H:%M') }} {% else %} {{ _('Never') }} {% endif %} | {% if token.last_used_at %} {{ token.last_used_at.strftime('%Y-%m-%d %H:%M') }} {% else %} {{ _('Never') }} {% endif %} | {% if token.is_revoked %} {{ _('Revoked') }} {% elif token.is_expired %} {{ _('Expired') }} {% else %} {{ _('Active') }} {% endif %} | {% if not token.is_revoked %} {# The name is the developer's own text, so it reaches the script as plain text turned into JSON, in a single quoted attribute no quote in it can leave. #} {% endif %} |