Added 'remember me' functionality to view
authordwickwire <wickwire@gmail.com>
Fri, 28 Oct 2011 15:57:34 +0000 (10:57 -0500)
committerdwickwire <wickwire@gmail.com>
Fri, 28 Oct 2011 15:57:34 +0000 (10:57 -0500)
cas_provider/templates/cas/logout.html
cas_provider/views.py

index e5e435f..f7b25e9 100644 (file)
@@ -7,6 +7,6 @@ Logged out
 {% block content %}
     <h3>Logged out</h3>
 
-    <p>You have successfully logged out. To ensure that you are logged out of all services, please close your browser.</p>
+    <p>You have successfully logged out.</p>
     {% if url %}<p><a href="{{ url }}">Click here</a> to return to {{ url }}</p>{% endif %}
 {% endblock %}
index 47f1758..fd15c4a 100644 (file)
@@ -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: