{% extends "base.html" %} {% load static %} {% block title %}Terminate Session - Session Management{% endblock %} {% block content %}

Terminate Session Confirmation Required

Confirm Session Termination

Session Termination

You are about to terminate an active user session. The user will be immediately logged out and will need to authenticate again.

Session Details
Session Key: {{ object.session_key|truncatechars:32 }}...
User: {% if object.user %} {{ object.user.get_full_name }}
{{ object.user.username }} {% else %} Anonymous Session {% endif %}
IP Address: {{ object.ip_address|default:"Unknown" }}
Created: {{ object.created_at|date:"M d, Y H:i:s" }}
Last Activity: {{ object.last_activity|date:"M d, Y H:i:s" }}
{{ object.last_activity|timesince }} ago
Session Status
Status: {% if object.is_active %} Active {% else %} Expired {% endif %}
Duration: {{ object.duration }}
Browser: {% if object.user_agent %} {{ object.browser_info.name }} {{ object.browser_info.version }}
{{ object.browser_info.os }} {% else %} Unknown {% endif %}
Expires: {% if object.expires_at %} {{ object.expires_at|date:"M d, Y H:i:s" }} {% if object.is_active %}
{{ object.expires_at|timeuntil }} remaining {% endif %} {% else %} No expiration {% endif %}
{% if object.is_active %}
Impact Assessment
  • User Experience: The user will be immediately logged out
  • Unsaved Data: Any unsaved work may be lost
  • Active Processes: Any ongoing operations will be interrupted
  • Re-authentication: User will need to log in again to continue
  • {% if object.user %}
  • Other Sessions: User's other active sessions will remain unaffected
  • {% endif %}
{% else %}
Session Already Expired

This session has already expired and is no longer active. Termination will only remove it from the database.

{% endif %} {% if object.suspicious_activity %}
Security Alert

This session has been flagged for suspicious activity.

Immediate termination is recommended for security reasons.

{% endif %} {% if object.user and related_sessions %}
Related Active Sessions

This user has {{ related_sessions|length }} other active session(s):

{% for session in related_sessions %} {% endfor %}
IP Address Browser Last Activity Action
{{ session.ip_address|default:"Unknown" }} {{ session.browser_info.name|default:"Unknown" }} {{ session.last_activity|timesince }} ago View
{% endif %}
{% csrf_token %}
Termination Confirmation
{% if object.is_active %}
{% endif %}
{% endblock %} {% block js %} {% endblock %}