{# The authentication factors list template. Displays the list of available authentication factors for a user. :param edited_user: The user being edited. :type edited_user: :class:`~canaille.core.models.User` #} {% extends theme('base.html') %} {%- block title -%} {% if user.user_name == edited_user.user_name %} {%- trans %}My profile{% endtrans -%} {% else %} {%- trans %}User profile edition{% endtrans -%} {% endif %} {%- endblock -%} {% block submenu %} {% trans %}Personal information{% endtrans %} {% trans %}Account settings{% endtrans %} {% trans %}Authentication{% endtrans %} {% endblock %} {% macro render_factor(name, icon, configured, url) %}
{{ name }}
{% if configured %} {% trans %}Configured{% endtrans %} {% else %} {% trans %}Not configured{% endtrans %} {% endif %}
{% endmacro %} {% block content %}

{% trans %}Authentication{% endtrans %}
{% trans %}Manage your authentication methods{% endtrans %}

{% if "password" in config.CANAILLE.AUTHENTICATION_FACTORS %} {{ render_factor( _("Password"), "key", edited_user.has_password(), url_for("core.account.auth.profile_auth_password", edited_user=edited_user) ) }} {% endif %} {% if features.has_otp and "otp" in config.CANAILLE.AUTHENTICATION_FACTORS %} {{ render_factor( _("Authenticator application"), "mobile alternate", edited_user.secret_token, url_for("core.account.auth.profile_auth_otp", edited_user=edited_user) ) }} {% endif %} {% if features.has_fido and "fido2" in config.CANAILLE.AUTHENTICATION_FACTORS %} {{ render_factor( _("Passkeys"), "fingerprint", edited_user.webauthn_credentials, url_for("core.account.auth.profile_auth_fido2", edited_user=edited_user) ) }} {% endif %}
{% endblock %}