From: deyk Date: Tue, 15 May 2012 23:27:56 +0000 (-0700) Subject: Now tracking login success. X-Git-Tag: 22.4~17 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/840be9bb10bd63d3d22d2d825339729b0b9f1eb6?ds=inline;hp=5f7036c4efc9088433ed9cf10aec91aac958ea69 Now tracking login success. --- diff --git a/cas_provider/signals.py b/cas_provider/signals.py index 799fb4e..ad366fd 100644 --- a/cas_provider/signals.py +++ b/cas_provider/signals.py @@ -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']) diff --git a/cas_provider/views.py b/cas_provider/views.py index 6632722..9ceeca4 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -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)