From 3663c3c8a13e5f5dd8c4ce545f9e2f276ab99a14 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 26 Sep 2020 20:38:38 +0200 Subject: [PATCH] sources/saml: cleanup SLO Implementation --- .../templates/saml/sp/sso_single_logout.html | 19 ------------------- passbook/sources/saml/views.py | 9 ++------- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 passbook/sources/saml/templates/saml/sp/sso_single_logout.html diff --git a/passbook/sources/saml/templates/saml/sp/sso_single_logout.html b/passbook/sources/saml/templates/saml/sp/sso_single_logout.html deleted file mode 100644 index 8d3ab945c..000000000 --- a/passbook/sources/saml/templates/saml/sp/sso_single_logout.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "saml/sp/base.html" %} - -{% block content %} -You are now logged out of this Service Provider.
-{% if idp_logout_url %} -You are still logged into your Identity Provider. -You should logout of your Identity Provider here:
-{{ idp_logout_url }} -{#XXX: Maybe this should happen as a redirect, rather than as javascript. #} -{% if autosubmit %} - -{% endif %} -{% endif %} -{% endblock content %} diff --git a/passbook/sources/saml/views.py b/passbook/sources/saml/views.py index 313d27d8c..92c79ecac 100644 --- a/passbook/sources/saml/views.py +++ b/passbook/sources/saml/views.py @@ -90,17 +90,12 @@ class SLOView(LoginRequiredMixin, View): """Single-Logout-View""" def dispatch(self, request: HttpRequest, source_slug: str) -> HttpResponse: - """Replies with an XHTML SSO Request.""" - # TODO: Replace with flows + """Log user out and redirect them to the IdP's SLO URL.""" source: SAMLSource = get_object_or_404(SAMLSource, slug=source_slug) if not source.enabled: raise Http404 logout(request) - return render( - request, - "saml/sp/sso_single_logout.html", - {"idp_logout_url": source.slo_url}, - ) + return redirect(source.slo_url) class MetadataView(View):