How do I compile my own AuthProvider?


I have written my own version of JDBCAuthProvider that has support for password encrypted with an AES key as this is what password are stored as in our existing database.

I put it in with the OpenFire source files, compiled the lot and then put the .class file into a .jar then copied that into the lib folder of OpenFire.
Then changed the AuthProviderClass setting in the openfire settings file.

However when I try and run OpenFire it logs the following error:

Error loading auth provider: org.jivesoftware.openfire.auth.MyJDBCAuthProvider

java.lang.ClassNotFoundException: org.jivesoftware.openfire.auth.MyJDBCAuthProvider

I have checked my code and I have definately renamed the class to MyJDBCAuthProvider.

Any ideas?



You should place your AuthProvider in openfire\src\java\org\jivesoftware\openfire\auth and just run the ant build script. This will build you an Openfire.jar for you to place in lib. There is no need to copy your class into the jar.