Now tracking login success.
authordeyk <deyk@crossway.org>
Tue, 15 May 2012 23:27:56 +0000 (16:27 -0700)
committerdeyk <deyk@crossway.org>
Tue, 15 May 2012 23:27:56 +0000 (16:27 -0700)
cas_provider/signals.py
cas_provider/views.py

index 799fb4e..ad366fd 100644 (file)
@@ -8,6 +8,6 @@ on_cas_collect_histories = dispatch.Signal(providing_args=["for_email"])
 
 on_cas_login = dispatch.Signal(providing_args=["request"])
 
-on_cas_login_success = dispatch.Signal(providing_args=["user"])
+on_cas_login_success = dispatch.Signal(providing_args=["user", "service"])
 
 cas_collect_custom_attributes = dispatch.Signal(providing_args=['user'])
index 6632722..9ceeca4 100644 (file)
@@ -123,6 +123,9 @@ def login(request, template_name='cas/login.html',
                 # Try and pull the service off the session
                 service = request.session.pop('service', service)
             
+            signals.on_cas_login_success.send(sender=login, request=request,
+                                              service=service, **kwargs)
+
             if service is None:
                 # Normal internal success redirection.
                 logging.debug('Redirecting to %s', success_redirect)