"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 19.08.22

"""
from django.contrib.auth import logout
from django.http import HttpRequest
from django.shortcuts import redirect

from konova.sub_settings.sso_settings import SSO_SERVER_BASE


def logout_view(request: HttpRequest):
    """
    Logout route for ending the session manually.

    Args:
        request (HttpRequest): The used request object

    Returns:
        A redirect
    """
    logout(request)
    return redirect(SSO_SERVER_BASE)
