是否可以使用 Bcrypt 作为 openfire 外部身份验证的密码类型?
带有 $2y$
的 bcrypt前缀是我现有用户群的加密。
我正在尝试实现 XMPP 作为我当前聊天系统的替代方案。
<jdbcAuthProvider>
<passwordSQL>SELECT password FROM user_account WHERE username=?</passwordSQL>
<passwordType>md5</passwordType>
</jdbcAuthProvider>
最佳答案
我最终得到了源代码并修改了 auth class
.编码 Java
.
我建议延长 jdbcAuthProvider
或只是 defaultAuthProvider
.这很简单。
This documentation is divided into three sections:
- Source, get the Openfire source code.
- Setup, how to setup your environment for Openfire development.
- Build tasks, tasks that can be performed using the build program.
然后,您可以在 mindrot.org 获取 Java 版 bCrypt。 .
if (BCrypt.checkpw(user_provided_password, hashed_password_from_db))
System.out.println("It matches");
else
System.out.println("It does not match");
关于ubuntu - OpenFire 外部认证密码类型 BCrypt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21450648/