Because the project needs, the user name in the project can not be unique, so openfire in the project cannot use the username in the Ofuser table to log in, after deliberation, two ways to solve:
1. Mark the contents of the Username field, for example, the original user name is Yezi, after the Mark Yezi#h, this h is our project distinguishes the different user name the way, this method does not have the technology, does not elaborate;
2, add a field in the Ofuser (because we have been using the Ofuser table), the field name is UserID, the primary key, self-growth, and then through the OpenFire custom login mode to configure;
Log in to the OpenFire backend management system and click on the system properties in Server Manager, as shown below:
Here can be openfire configuration and modification of the system properties, and the content of this page configuration is saved in the OpenFire database Ofproperty table, keyi open to see
It doesn't explain what's inside, it's some openfire system setup.
OK, the ink is finished, start to say:
All I need now is login with UserID.
Find Org.jivesoftware.openfire.auth.JDBCAuthProvider in OpenFire source, in the beginning of the file, we can see
Probably means to change the provider.auth.className to Org.jivesoftware.openfire.auth.JDBCAuthProvider, after the login verification to go Jdbcauthprovider code, there are some parameters that need to be configured, the rules have been, to configure it.
Depending on your needs, my configuration is as follows:
After configuration, restart the OpenFire, you can log in (the database password is clear, not encrypted, encrypted after the password verification said), but OpenFire management system login not to go in
Workaround: View the Peopvalue field value for Admin.authorizedjids in the Ofproperty table, in the format username@ ' Domain name ', where username should be the data that exists in the table, the domain name is the Peopvalue field value of Xmpp.domain, OK now can be landed successfully via spark and background management