From: dwickwire Date: Fri, 28 Oct 2011 15:57:34 +0000 (-0500) Subject: Added 'remember me' functionality to view X-Git-Tag: 22.4~64 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/aa87097f1cff052c603ce135d3f5f329024d988b?ds=sidebyside Added 'remember me' functionality to view --- diff --git a/cas_provider/templates/cas/logout.html b/cas_provider/templates/cas/logout.html index e5e435f..f7b25e9 100644 --- a/cas_provider/templates/cas/logout.html +++ b/cas_provider/templates/cas/logout.html @@ -7,6 +7,6 @@ Logged out {% block content %}

Logged out

-

You have successfully logged out. To ensure that you are logged out of all services, please close your browser.

+

You have successfully logged out.

{% if url %}

Click here to return to {{ url }}

{% endif %} {% endblock %} diff --git a/cas_provider/views.py b/cas_provider/views.py index 47f1758..fd15c4a 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -27,7 +27,9 @@ def login(request, template_name='cas/login.html', success_redirect='/accounts/' password = request.POST.get('password', None) service = request.POST.get('service', None) lt = request.POST.get('lt', None) - + if not request.POST.get('remember_me', None): + request.session.set_expiry(0) + try: login_ticket = LoginTicket.objects.get(ticket=lt) except: