code: def logout_user(request):
      
      logger.debug("Logout request received for %s" % request.user)
      if is_authenticated(request.user):
          ServiceTicket.objects.consume_tickets(request.user)
          ProxyTicket.objects.consume_tickets(request.user)
          ProxyGrantingTicket.objects.consume_tickets(request.user)
  
          ServiceTicket.objects.request_sign_out(request.user)
  
          logger.info("Single sign-on session ended for %s" % request.user)
          logout(request)
          messages.success(request, _('You have been successfully logged out'))
docs: End a single sign-on session for the current user.