{# .. screenshot:: |canaille|/oauth/device :context: admin :align: right :width: 275px The device verification dialog. Device authorization verification template (:rfc:`8628`). This template is displayed to users that authorize a device with limited input capabilities (such as a TV or a console). Users enter the code displayed on their device, then approve or deny the authorization request. :param form: The user code form. :type form: :class:`~canaille.oidc.endpoints.forms.DeviceForm` :param device_code: The device code being authorized, when a valid code has been entered. :type device_code: :class:`~canaille.oidc.basemodels.DeviceCode` #} {% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {% import 'macro/flask.html' as flask %} {# Flash messages are rendered under the page title instead of at the top. #} {% block messages %}{% endblock %} {% block content %}
{% if confirmed | default(false) %} {% if granted %}

{% trans %}Device authorized{% endtrans %}

{% trans name=client.client_name %}You may now go back to {{ name }} on your device.{% endtrans %}
{% else %}

{% trans %}Device authorization denied{% endtrans %}

{% trans %}The authorization request has been denied. You may close this page.{% endtrans %}
{% endif %} {% elif device_code | default(false) %} {% if client.logo_uri %} {{ client.client_name }} {% endif %}

{% trans name=client.client_name %}The device {{ name }} is requesting access to:{% endtrans %}

{% for scope in effective_scope.split(" ") %} {% if scope not in ignored_scopes %}
{% if scope in scope_details %}
{{ scope_details[scope][1] }}
{% else %}
{{ scope }}
{% endif %}
{% endif %} {% endfor %}
{{ device_code.user_code }}
{% trans %}Make sure this code matches the one displayed on your device.{% endtrans %}
{{ gettext('You are logged in as %(name)s', name=user.formatted_name) }}
{% call fui.render_form(form) %}
{% endcall %}
{% else %}

{% trans %}Authorize a device{% endtrans %}
{% trans %}Enter the code displayed on your device to authorize it.{% endtrans %}

{{ flask.messages() }} {% call fui.render_form(form, action_text=_("Continue")) %} {{ form.user_code() }} {% endcall %} {% endif %}
{% endblock %}