Wildfire authentication from an existing SQL database

Is there anyway to have wildfire authenticate from a SQL database used by another program?

Hi Jason,

Yes, what you’'ll want to do is write your own UserProvider and AuthProvider classes. A few examples of each are provided with the Wildfire source. For the AuthProvider interface there is DefaultAuthProvider, LdapAuthProvider, NativeAuthProvider and POP3AuthProvider, and for the UserProvider interface there is the DefaultUserProvider and LdapUserProvider.

Hope that helps,

Ryan

These are Java classes correct? I just want to make sure when I request additional people to my team that I ask for the right kind of people

-Jason

These are Java classes correct?

Yup.

Ok, I think this may not be the right forum to ask this but…

After I get those classes written, do I have to recompile the entire server and reinstall it or is there some other way to do it? If I have to recompile the server how do I do that? Also, where do I tell the server with AuthProvider and UserProvider to use?

Thanks,

Jason

Hi Jason,

After I get those classes written, do I have to

recompile the entire server and reinstall it or is

there some other way to do it?

No, that’'s not necessary. The best approach is to jar up your class files, put the jar in the wildfire/lib directory and then edit your wildfire.xml configuration file to point to your classes, i.e.:

/code

Hope that helps,

Ryan

So assuming I jar my new classes (SQLAuth.class) and (SQLUser.class) into SQLAuthenticate.jar and then place this jar file into my %Wildfire Path%\lib directory and then make the neccessary changes in the wildfire.xml file with reguards to the user and auth settings, do I need to make any other changes?

do I need to make any other changes?

No, that should do it.

Where do I tell the server which database to authenticate too. Basicly I want it to use the database I specified in setup for everything except user authentication, for which I want it to use a different database.

Where do I tell the server which database to

authenticate too.

That is something your classes will have to handle. You could store the connection information in the property table or in the xml config file by using the JiveGlobals xxxProperty() or xxxXMLProperty() methods respectively.

OK, I dont think ill have time for all that today. Thanks for the help.

Jason

In the wildfire.xml file you will have to add this code

That would just set the default SQL database to the one specified, right? What I need to do is allow the server to communicate with the previously defined database for all things except authentication.

Hi Mahaveer,

In the wildfire.xml file you will have to add this

code

Wildfire will automatically add those elements to its config file during setup. But, since Jason is wanting to use two different databases he’'ll probably want to do something like:

/code

Wildfire will use the connection settings in the .

Regards,

Ryan