</cas:authenticationFailure>
</cas:serviceResponse>''', mimetype='text/xml')
-def logout(request, template_name='cas/logout.html'):
+def logout(request, template_name='cas/logout.html', auto_redirect=False):
url = request.GET.get('url', None)
- auth_logout(request)
- return render_to_response(template_name, {'url': url}, context_instance=RequestContext(request))
\ No newline at end of file
+ if request.user.is_authenticated():
+ auth_logout(request)
+ if url and auto_redirect:
+ return HttpResponseRedirect(url)
+ return render_to_response(template_name, {'url': url}, context_instance=RequestContext(request))
setup(
name='django-cas-provider',
- version='0.2',
+ version='0.2.1',
description='A "provider" for the Central Authentication Service (http://jasig.org/cas)',
author='Chris Williams',
author_email='chris@nitron.org',