相关疑难解决方法(0)

没有密码的django身份验证

我正在使用django的默认身份验证系统,但我已添加到OpenID库中,我可以通过OpenID对用户进行身份验证.我想要做的是登录,但似乎使用默认的django auth系统,我需要他们的密码来验证用户.有没有办法绕过这个而不实际使用他们的密码?

我想做这样的事......

user = ... # queried the user based on the OpenID response
user = authenticate(user) # function actually requires a username and password
login(user)
Run Code Online (Sandbox Code Playgroud)

我很快就离开了这个authenticate函数,但是它附加了一个backend登录所需的字段.

openid authentication django

20
推荐指数
4
解决办法
1万
查看次数

标签 统计

authentication ×1

django ×1

openid ×1