ubuntu - OpenFire 外部认证密码类型 BCrypt

标签 ubuntu xmpp openfire

是否可以使用 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:

  1. Source, get the Openfire source code.
  2. Setup, how to setup your environment for Openfire development.
  3. 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/

相关文章:

c# - X-FACEBOOK-PLATFORM 未经授权

javascript - XEP-0133 : Admin request to get all online users list

ios - 如何在 iOS 的 openfire/xmpp 中获取所有在线用户的列表?

ubuntu - Spyder 在 Ubuntu 16.04 上安装了 Anaconda3 : Weird Window Style/Big Menus

bash - 如何以编程方式编辑 pg_hba.conf?

ubuntu - 在最新的 Ubuntu 14.04 上安装最新的钛工作室

xmpp - 即使与XMPP服务器断开连接,如何保持群聊室(MUC)始终存在?

ubuntu - 无法在 Ubuntu 12.04 的 USB 串行端口上设置波特率

python - 如何使用 python-xmpp 设置 Jabber 状态?

amazon-ec2 - 使用 EC2(亚马逊网络服务)的自动 Ejabberd 集群