Jabber Openfire server v3.6.0a+ - how do I use Hybrid authentication?

↘锁芯ラ 提交于 2019-12-01 10:23:37

问题


I'm setting up a Jabber server for my website. I've already got some user accounts in place in the openfire database, and working IMs between them.

I'm now looking to add (some) of the users from my main database (members table, with login, password[plain text]) and allowed_to_IM[0 or 1] fields) to allow them to communicate between themselves. The Hybrid authentication is a new feature in v3.6.0a however, and there's little documentation in what configuration is required in the openfire.xml file for the database connectivity (to a second database), and what else may go in the properties (which have also taken much of the config's info away of the XML file).

My question is: Does anyone have a complete example that checks multiple databases? All the examples I'm seen seem to be just fragments.


回答1:


I have it using ldap and mysql and if it helps you my setting from openfire.xml are:

    <connectionProvider>
    <className>org.jivesoftware.database.DefaultConnectionProvider</className>
  </connectionProvider>
  <database>
    <defaultProvider>
      <driver>com.mysql.jdbc.Driver</driver>
      <serverURL>jdbc:mysql://127.0.0.1:3306/openfire</serverURL>
      <username>username</username>
      <password>pass</password>
      <minConnections>5</minConnections>
      <maxConnections>15</maxConnections>
      <connectionTimeout>1.0</connectionTimeout>
    </defaultProvider>
  </database>
  <ldap>
  ldapsetting removed
  </ldap>
  <hybridAuthProvider>
    <primaryProvider>
      <className>org.jivesoftware.openfire.auth.DefaultAuthProvider</className>
    </primaryProvider>
    <secondaryProvider>
      <className>org.jivesoftware.openfire.ldap.LdapAuthProvider</className>
    </secondaryProvider>
  </hybridAuthProvider>
  <provider>
    <auth>
      <className>org.jivesoftware.openfire.auth.HybridAuthProvider</className>
    </auth>
    <vcard>
      <className>org.jivesoftware.openfire.auth.DefaultAuthProvider</className>
    </vcard>
    <user>
      <className>org.jivesoftware.openfire.ldap.LdapUserProvider</className>
    </user>
    <auth>
      <className>org.jivesoftware.openfire.ldap.LdapAuthProvider</className>
    </auth>
    <group>
      <className>org.jivesoftware.openfire.ldap.LdapGroupProvider</className>
    </group>
  </provider>


来源:https://stackoverflow.com/questions/64364/jabber-openfire-server-v3-6-0a-how-do-i-use-hybrid-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!