Hi,
We have been trying to setup custom authentication for some time now without success. What we’re trying to do is use the default embedded OpenFire database for everything except user authentication. We would like to run the use authentication against an external database.
We’ve configured everything according to the documentation, but it just does not seem to be working. It is clear that OpenFire does not even try to run the authentication SQL query on our external database.
Here is our configuration file. If anyone can tell what we’re doing wrong we’ll be greatful.
Thanks in advance!
===============================================
<?xml version="1.0" encoding="UTF-8"?> <!--
This file stores bootstrap properties needed by Openfire.
Property names must be in the format: "prop.name.is.blah=value"
That will be stored as:
<prop>
<name>
<is>
<blah>value</blah>
</is>
</name>
</prop> Most properties are stored in the Openfire database. A
property viewer and editor is included in the admin console.
-->
<!-- root element, all properties must be under this element -->
<jive> <adminConsole> <!-- Disable either port by setting the value to -1 --> <port>9090</port> <securePort>9091</securePort> </adminConsole> <locale>en</locale> <!-- Network settings. By default, Openfire will bind to all network interfaces.
Alternatively, you can specify a specific network interfaces that the server
will listen on. For example, 127.0.0.1. This setting is generally only useful
on multi-homed servers. --> <!--
<network>
<interface></interface>
</network>
--> <connectionProvider> <className>org.jivesoftware.database.EmbeddedConnectionProvider</className> </connectionProvider> <setup>true</setup> <database/> <!-- Authentication and User Integration for external database --> <provider> <auth> <className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className> </auth> </provider> <jdbcAuthProvider> <passwordSQL>SELECT Password FROM customer WHERE UserName=?</passwordSQL> <passwordType>plain</passwordType> </jdbcAuthProvider> <jdbcProvider> <driver>com.mysql.jdbc.Driver</driver> <connectionString>jdbc:mysql://127.0.0.1/etoro?username=root&password=admin</connectionString> </jdbcProvider> </jive>