{% extends 'users/base.html' %} {% from '_switch.html' import switch %} {% from 'message_box.html' import message_box %} {% from 'api/_messages.html' import get_enable_persistent_msg, get_disable_persistent_msg %} {% block user_content %} {% if can_create_personal_tokens %} {% call message_box('warning') %} {%- set link_start -%} {%- endset -%} {%- set link_end -%} {%- endset -%}
{% trans -%} API keys are deprecated and may be removed in a future Indico version. {%- endtrans %}
{% trans -%} Please create {{ link_start }}API tokens{{ link_end }} instead. They use a more standard way of authenticating (Bearer token authentication instead of an HMAC signature) and you can (and should!) create one token for each script/application where you need to access the Indico API. To reduce the risk from a leaked token they also let you specify more fine-grained scopes. {%- endtrans %}
{% endcall %} {% endif %}{%- trans -%} You do not have an API key at the moment. If you would like to use our API, please create an API key using the button below. {%- endtrans -%}
{% else %}{% trans %}This is the list of old keys associated with this user.{% endtrans %}
{% if old_keys %}{{ old_key.token }}
{%- if not old_key.use_count -%}
{%- trans %}never used{% endtrans -%}
{%- else -%}
{%- trans n = old_key.use_count -%}
used once
{%- pluralize -%}
used {{ n }} times
{%- endtrans -%}
{%- if old_key.last_used_dt -%}
, {% trans date=old_key.last_used_dt|format_datetime('short') -%}
last used on {{ date }}
{%- endtrans %}
{%- endif -%}
{%- endif -%}
{% trans %}There are no old keys.{% endtrans %}
{% endif %}