{% extends "core/settings/settings_base.html" %} {% load rich_text %} {% load i18n %} {% block settings_content %}

{% translate "Integrations" %}

{% blocktranslate trimmed with platform=platform_name %} Other applications can integrate with {{ platform }} by asking you for access to your data. You can also create personal API tokens to access {{ platform }} from other applications. If you are unsure about the origins of a token or the security of the third party application please revoke access. {% endblocktranslate %}

{% translate "Third party applications" %}

{% for token in oauth_access_tokens %}
{{ token.application.name }}

{# this belongs to the federation plugin, but we display the information here for better understanding #} {% if token.application.federatedhost %} {% translate "ephios instance" %} {% endif %}

{% translate "Scope" %}
    {% for scope_name, scope_description in token.scopes.items %}
  • {{ scope_name }}: {{ scope_description }}
  • {% endfor %}
{% if token.revoked %} {% translate "Revoked" %} {% else %}
{% csrf_token %}
{% endif %}
{% empty %}

{% translate "No applications have been authorized." %}

{% endfor %}

{% translate "Personal API tokens" %}

{% translate "Create new API token" %} {% for token in personal_access_tokens %}
{{ token.description|rich_text }}

{% blocktranslate trimmed with created=token.created %} created on {{ created }} {% endblocktranslate %}
{% if token.revoked %} {% blocktranslate trimmed with revoked=token.expires %} revoked on {{ revoked }} {% endblocktranslate %} {% elif token.is_expired %} {% blocktranslate trimmed with expires=token.expires %} expired on {{ expires }} {% endblocktranslate %} {% elif token.expires %} {% blocktranslate trimmed with expires=token.expires %} expires on {{ expires }} {% endblocktranslate %} {% else %} {% translate "does not expire" %} {% endif %}

{% translate "Scope" %}
    {% for scope_name, scope_description in token.scopes.items %}
  • {{ scope_name }}: {{ scope_description }}
  • {% endfor %}
{% if token.revoked %} {% translate "Revoked" %} {% elif token.is_expired %} {% translate "Expired" %} {% elif token.is_valid %}
{% csrf_token %}
{% endif %}
{% empty %}

{% translate "There are no tokens." %}

{% endfor %} {% endblock %}