Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Custom Authentication using MYSQL

$
0
0

I have done the setup as mentioned in the below link:

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integ ration-guide.html

 

These are the properties set ('ofproperty' table):

'admin.authorizedUsernames'          -     'sirim'

'emailField'                                     -     'email'

'jdbcAuthProvider.passwordSQL'     -      'SELECT password FROM user_profiles WHERE user_id=?'

'jdbcAuthProvider.passwordType'     -      'plain'

'jdbcGroupProvider.allGroupsSQL'     -      'SELECT group_Name FROM user_groups'

'jdbcGroupProvider.descriptionSQL'     -      'SELECT group_Description FROM user_groups WHERE group_Name=?'

'jdbcGroupProvider.groupCountSQL'     -      'SELECT count(*) FROM user_groups'

'jdbcGroupProvider.loadAdminsSQL'     -      'SELECT user_id FROM user_groups WHERE group_Name=? AND isAdmin=''Y'''

'jdbcGroupProvider.loadMembersSQL'     -      'SELECT user_id FROM user_groups WHERE group_Name=? AND isAdmin=''N'''

'jdbcGroupProvider.userGroupsSQL'     -      'SELECT group_Name FROM group_users WHERE user_id=?'

'jdbcProvider.connectionString'               -      'jdbc:mysql://localhost/DojoProj?user=root&password=root'

'jdbcProvider.driver'                              -     'com.mysql.jdbc.Driver'

'jdbcUserProvider.allUsersSQL'              -      'SELECT user_id FROM user_profiles'

'jdbcUserProvider.loadUserSQL'          -      'SELECT name,email FROM user_profiles WHERE user_id=?'

'jdbcUserProvider.searchSQL'               -     'SELECT user_id FROM user_profiles WHERE'

'jdbcUserProvider.userCountSQL'          -      'SELECT COUNT(*) FROM user_profiles'

'nameField'                                        -     'name'

'passwordKey'                                   -      'LG9okrU2A8PKpIS'

'provider.admin.className'               -      'org.jivesoftware.openfire.admin.DefaultAdminProvider'

'provider.auth.className'                    -      'org.jivesoftware.openfire.auth.JDBCAuthProvider'

'provider.group.className'               -      'org.jivesoftware.openfire.group.JDBCGroupProvider'

'provider.lockout.className'               -     'org.jivesoftware.openfire.lockout.DefaultLockOutProvider'

'provider.securityAudit.className'     -      'org.jivesoftware.openfire.security.DefaultSecurityAuditProvider'

'provider.user.className'                    - 'org.jivesoftware.openfire.user.JDBCUserProvider'

'provider.vcard.className'                    -     'org.jivesoftware.openfire.vcard.DefaultVCardProvider'

'update.lastCheck'                              -     '1357540683343'

'usernameField'                                   -     'user_id'

'xmpp.auth.anonymous'                             -     'true'

'xmpp.domain'                                   -      'localhost'

'xmpp.pubsub.service'                    -      'pubsub'

'xmpp.session.conflict-limit'               -      '0'

'xmpp.socket.ssl.active'                    -      'true'

 

This is the content in 'conf/openfire.xml':

<jive>

  <adminConsole>

    <!-- Disable either port by setting the value to -1 --> 

    <port>9090</port> 

    <securePort>9091</securePort>

  </adminConsole> 

  <locale>en</locale> 

 

<connectionProvider>

    <className>org.jivesoftware.database.DefaultConnectionProvider</className>

  </connectionProvider> 

  <database>

    <defaultProvider>

      <driver>com.mysql.jdbc.Driver</driver> 

      <serverURL>jdbc:mysql://localhost:3306/DojoProj?rewriteBatchedStatements=true</ serverURL> 

      <username>root</username> 

      <password>root</password> 

      <testSQL>select 1</testSQL> 

      <testBeforeUse>false</testBeforeUse> 

      <testAfterUse>false</testAfterUse> 

      <minConnections>1</minConnections> 

      <maxConnections>2000</maxConnections> 

      <connectionTimeout>1</connectionTimeout>

    </defaultProvider>

  </database> 

  <setup>true</setup>

</jive>

 

I tried logging in openfire admin console with username 'sirim' and password 'siri', but ended up with some error like ''Login failed: make sure your username and password are correct and that you're an admin or moderator." Even with 'admin', 'admin', the issue is same.

 

I have checked even the logs, but ended up with no clue. Even error.log is not updated with any error message.

Can someome please help me out to resolve this. Please let me know if additional information is needed. Thanks.


Viewing all articles
Browse latest Browse all 10742

Trending Articles