* refactors method based views for parcel fetching, home and logout to class based
29 lines
713 B
Python
29 lines
713 B
Python
"""
|
|
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 django.views import View
|
|
|
|
from konova.sub_settings.sso_settings import SSO_SERVER_BASE
|
|
|
|
|
|
class LogoutView(View):
|
|
def get(self, 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)
|