How to access custom database?

Hi,

Iam very new, regarding the use of openfire. I have installed openfire successfully in windows. Installed the client(spark) and successfully can chat. And server is working very well. so far so good.

Now my basic requirement is, i have to use my custom database for userid and password field, rather than using openfire database. So that while we are going to login throw client, openfire will take the corresponding password of the userid from my custom database and verify it.

I have searched some forums and documentations of openfire, and got the idea about changing openfire.xml for this purpose. But the bad news for me is that, no one has given a complete set of code of openfire.xml for this purpose.

So plase help me regarding that purpose, and also will be very good, if i get a complete set of code for openfire.xml.

Thanks in advance.

Hi,

every one uses another database / connection URL so you’ll never find an openfire.xml file which you can use. Inserting a few lines into the existing file is quite easy, so I really wonder why you do not just do it.

LG

Hi,

Firstly thanks for showing interest on my issue. May be i was unable to make u understand what my exact issue is.

As my main motto is to use two databases, openfire database and as well as my custom database. For login varification, userid and password will be verified from my database. But the rest of the information(such as friends, group…etc) will be stored in oenfire database. I can not store userid and password from my database to openfire database(according to clients requirement).

So my problem is, how to access two databases from openfire server. Because login varification for chating will be done by openfire server.

Please send me a step by step instruction. Thanks in advance

Hi,

did you miss http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html ?

LG

Hi,

Thanks for your link. It is working now. But i have last one question regarding this issue. Till now iam comparing plain password. But in realtime my custom database password encription is different than openfire password encription. Problem is that, my application password encription is using a class for that encription and this encription is not a fixed one like md5 or base64. It is using some internal encription algorithm along with base64. So is there any way to customise the password varification using my application encription/decription procedure? or using that class of my application?

If there is any way, please let me know the configuration or step by step procedure. Thanks in advance.

Hi,

you can write your own auth provider, also with little java knowledge this is quite easy.

LG