简体   繁体   English

如何配置open fire以从外部数据库验证用户?

[英]How to configure open fire to authenticate users from external database?

This is the longest possible thread I have come across to fix a very simple problem to authenticate users from external database in open fire 这是我遇到的最长的线程,用于修复一个非常简单的问题,即在开放式火灾中外部数据库验证用户身份

Proper fix is that do not change the properties in the conf/openfire.xml , Add the properties in the ofProperty table mentioned here 正确的解决方法是不要更改conf/openfire.xml ofProperty中的属性,在这里提到的ofProperty表中添加属性

e.g For Authentication Integration 

insert into ofProperty values('provider.auth.className', 'org.jivesoftware.openfire.auth.JDBCAuthProvider');
insert into ofProperty values('jdbcAuthProvider.passwordSQL', 'SELECT password FROM user_account WHERE username=?');
insert into ofProperty values('jdbcAuthProvider.passwordType', 'plain');

stop the openfire and start the openfire. 停止openfire并开始openfire。

Note: All the settings in changed manually in the /conf/openfire.xml will be lost when open fire starts. 注意:在开火,在/conf/openfire.xml中手动更改的所有设置都将丢失。

Question : 题 :

  • How do I login in to admin console after changing the properties ? 更改属性后如何登录管理控制台?

  • Can openfire authenticate users from its own database and external database as well ? openfire可以从自己的数据库和外部数据库中验证用户吗?

First of all, avoid inserting custom queries in the xml file or in the database. 首先,避免在xml文件或数据库中插入自定义查询。 The best way is to add the data in the admin panel of openfire following the examples in the docs. 最好的方法是按照文档中的示例在openfire的管理面板中添加数据。

To allow your external users to log to the admin panel, you have to add their jabber id in admin.authorizedJIDs 要允许外部用户登录管理面板,您必须在admin.authorizedJIDs中添加他们的jabber ID

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM