{# A set of components for rendering session details (as in a user session). #} {% macro session(session, revoke_endpoint, is_current_session=False) %}
Location
{{ session.location }}
Platform
{{ session.platform }}
Signed-in
{{ session.signed_in|humanize_datetime }}
{% if session.mfa_authorized %}
2FA
{{ session.mfa_authorized|humanize_datetime }}
{% endif %}
Last accessed
{{ session.last_accessed|humanize_datetime }}
{% if csrf_token %} {% endif %} {% if is_current_session %}
Current
{% endif %}
{% endmacro %} {% macro sessions(sessions, revoke_endpoint, current_session=None) %}
{% for s in sessions %} {{ session(s, revoke_endpoint, s == current_session) }} {% endfor %}
{% endmacro %}