powered by Jive Software

Reg: admin console login ( using custom database integration with opefire )

Hi All,

i have customized, my database , there i am getting the list of user credentials .

so my problem is i am unable to login into admin console,

Procedure :

i have a database XYZ with table users contains fields, username,password,first_name,email_address …etc.

from this xyz database , i am calling the requried fieds(username,password) in the openfire database.

so here i am getting login to spark client by providing my XYZ database users table credentials like (username,password)

but i am unable to login to admin console,

can any one please assist me,

i provided the username as admin and password ad admin, but i could’nt login into admin console.

( ofproperty ) table in openfire:

jdbcAuthProvider.allowUpdate
true
jdbcAuthProvider.passwordSQL
SELECT password FROM mobyko.ACCOUNT WHERE username=?
jdbcAuthProvider.passwordType
plain
jdbcAuthProvider.setPasswordSQL
UPDATE mobyko.ACCOUNT SET password=? WHERE username=?
jdbcProvider.connectionString
jdbc:mysql://localhost/openfire?user=root&password=admin
jdbcProvider.driver
com.mysql.jdbc.Driver
jdbcUserProvider.allUsersSQL
SELECT username FROM mobyko.ACCOUNT
jdbcUserProvider.emailField
email_address
jdbcUserProvider.loadUserSQL
SELECT CONCAT(first_name,’ ‘,last_name),email_address FROM mobyko.ACCOUNT WHERE username=?
jdbcUserProvider.nameField
CONCAT(first_name,’ ',last_name)
jdbcUserProvider.searchSQL
SELECT username FROM mobyko.ACCOUNT WHERE
jdbcUserProvider.userCountSQL
SELECT COUNT(*) FROM mobyko.ACCOUNT
jdbcUserProvider.usernameField
username
provider.auth.className
org.jivesoftware.openfire.auth.JDBCAuthProvider
provider.user.className
org.jivesoftware.openfire.user.JDBCUserProvider
xmpp.session.conflict-limit
0

below is the settings for openfire.xml in my PC.

<?xml version="1.0" encoding="UTF-8"?> 9090 9091 en org.jivesoftware.database.DefaultConnectionProvider com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/openfire root admin 5 15 1.0 true com.mysql.jdbc.Driver jdbc:mysql://localhost/openfire?user=root&password=admin org.jivesoftware.openfire.auth.JDBCAuthProvider org.jivesoftware.openfire.user.JDBCUserProvider SELECT password FROM mobyko.ACCOUNT WHERE username=? plain true UPDATE mobyko.ACCOUNT SET password=? WHERE username=? true SELECT CONCAT(first_name,' ',last_name),email_address FROM mobyko.ACCOUNT WHERE username=? SELECT COUNT(*) FROM mobyko.ACCOUNT SELECT username FROM mobyko.ACCOUNT SELECT username FROM mobyko.ACCOUNT WHERE username CONCAT(first_name,' ',last_name) email_address admin,testuser

finally i got the solution !

simply we need to give the credentials in our custom database with in specified table .

username as admin is mandatory.

password is anything which u like…

and remove encryption coding in these two java classes.

defaultuserprovider.java and defaultauthprovider.java respectively…

bcoz in these 2 java classes we applying encryption for respected methods in above java classes.

any further assistance , feel free to reply.