Use API instead of sql query for authenticating users in openfire

Is it possible to use API instead of following sql query in openfire properties:
jdbcAuthProvider.passwordSQL: SELECT username FROM chat_authentication WHERE username=?
Basically the chat_authentication table in our mysql database is not functioning properly and hence some users’ entries are not there in the table. So I want to hit the API directly which never fails. How can I do that in this case?