远程认证用户的Django注销 [英] Django user logout with remote authentication

查看:184
本文介绍了远程认证用户的Django注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有通过Kerberos使用远程身份验证的网站。 //:我根据Django文档( HTTPS设置一切docs.djangoproject.com/en/dev/howto/auth-remote-user/ )。登录伟大的作品,但注销不结束会话。我能做些什么,以确保用户完全退出?关闭浏览器窗口完全似乎工作,但用户需要注销已没有关闭浏览器窗口的能力。

I have a website that uses remote authentication via Kerberos. I've set everything up according to the Django documentation (https://docs.djangoproject.com/en/dev/howto/auth-remote-user/). Logging in works great, however logging out doesn't end the session. What can I do to ensure the user is fully logged out? Closing the browser window entirely does seem to work, but users need to have the ability to log out without closing the browser window.

推荐答案

使用的 Htt的presponse 返回状态401。

Use HttpResponse to return status 401.

def logout(request):
    return HttpResponse(content, status=401)

这将出从Kerebos登录用户。

This will log the user out from Kerebos.

贷:我看到这个解决方案,其他相关的基本身份验证

这篇关于远程认证用户的Django注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆