X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/d49f1c192506e97590f1c253a21f6b6e95228ea5..605ad870b8d8b0154b3f27e730d1b3fff02c789b:/cas_provider/views.py diff --git a/cas_provider/views.py b/cas_provider/views.py index eed2d64..ea72805 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -130,20 +130,19 @@ def socialauth_login(request, template_name='cas/login.html', success_redirect=' def validate(request): service = request.GET.get('service', None) ticket_string = request.GET.get('ticket', None) - logger.debug("service: %s"% service) - logger.debug("ticket_string: %s"% ticket_string) + logger.info('Validating ticket %s for %s', ticket_string, service) if service is not None and ticket_string is not None: try: ticket = ServiceTicket.objects.get(ticket=ticket_string) except ServiceTicket.DoesNotExist: - logger.exception("Tried to validate with an invalid ticket: %s / %s", ticket_string, service) + logger.exception("Tried to validate with an invalid ticket %s for %s", ticket_string, service) else: username = ticket.user.username ticket.delete() results = signals.on_cas_collect_histories.send(sender=validate, for_email=ticket.user.email) histories = '\n'.join('\n'.join(rs) for rc, rs in results) - + logger.info('Validated %s %s', username, "(also %s)" % histories if histories else '') return HttpResponse("yes\n%s\n%s" % (username, histories)) return HttpResponse("no\n\n")