Jabber Openfire server v3.6.0a+ - how do I use Hyb

2019-02-20 06:53发布

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条回答
一夜七次
2楼-- · 2019-02-20 07:31

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>
查看更多
登录 后发表回答