是否可以在django_auth中更改哈希算法? [英] Is it possible to change the Hashing algorithm in django_auth?
问题描述
我必须使用我的旧用户/组数据库(其具有不同的散列算法密码然后django_auth),并同步它现在,然后,因为我的用户已经有一个登录必须是一样的无处不在。
我也要使用django_auth。 / p>
是否可以更改django_auth中的哈希算法?
以便django auth使用我写的函数来检查插入的密码是正确还是错误。
提前感谢Senad。 =)
可以将Django与现有身份验证集成
系统 - 用户名和密码的另一个来源或身份验证
方法。
您可以覆盖Django默认的基于数据库的方案,或者您可以
与其他系统一起使用默认系统。
此外,在本书中,您可以学习如何编写自己的身份验证后端,实现两种方法:get_user(id)和身份验证(**凭证)。
I have a running wiki with users. Now I want to write an app in Django to do a specific task.
I have to use my "old" users/groups database (which has a different hashing algorithm for passwords then django_auth) and sync it every now and then since my users already have a login which has to be the same everywhere.
I want to use django_auth as well.
Is it possible to change the Hashing algorithm in django_auth?
so that django auth uses a function I write to check whether the password inserted is right or wrong.
Thanks in advance, Senad. =)
From Integrating with an Authentication System, chapter18 of djangobook
It’s possible to integrate Django with an existing authentication system — another source of usernames and passwords or authentication methods. You can override Django’s default database-based scheme, or you can use the default system in tandem with other systems.
Also, in this book, you can learn how to write your own Authentication Backend implementing two methods: get_user(id) and authenticate(**credentials).
这篇关于是否可以在django_auth中更改哈希算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!