{# @description A token that was created a moment ago, shown whole for the only time, with a button that copies it. #} {# @prop value:text | description:"The complete token." #} {# @prop header_prefix:text | default:"Token" | description:"The word that goes before the token in the Authorization header." #} {# @prop done_url:text | description:"Where the person goes once they have the token." #} {% comment %} The clipboard API only exists on a secure page, so the button falls back to copying the selected field. Without scripts the field can still be selected by hand. {% endcomment %} {% load i18n %} {% trans "Copy" as copy_label %} {% trans "Copied" as copied_label %} {% trans "Copy this token now and keep it somewhere safe. It will not be shown again." %}
{% trans "Token" %} {{ copy_label }}
{% blocktrans trimmed %} Send it with each request, in the Authorization header: Authorization: {{ header_prefix }} <your token> {% endblocktrans %} {% if done_url %} {% endif %}