Search code examples
xmppregistrationejabberd

how can I register app id into ejabberd server's database?


We are using a mobile xmpp client to chat with ejabberd server. During the registration, we want the following fields: JID, Password, appID to be sent to the xmpp server.

Which module should I look into to incorporate this change? I also want to store the appID in ejaberd's users table in the database. Further in our current installation we can see the password. Which module of ejabberd should I invoke to encrypt store the passwords. Also can we verify the user using the encrypted password? Any suggestion and pointers to the right direction will be of great help.


Solution

  • We are using a mobile xmpp client to chat with ejabberd server. During the registration, we want the following fields: JID, Password and the appID to be sent to the xmpp server ( ejabberd here). Which module should I look into to incorporate this change? I also want to store the appID in ejaberd's users table in the database.

    mod_register only takes username and password during registration. If you want to store other details during registration, you would have to modify the source code of that module. Or you can store the appid and any other information in the account vcard, once the account is created and the client logins to it.

    Further in our current installation we can see the password . which module of ejabberd should I invoke to encrypt the password and store the encrypted passwords. Also can we verify the user using the encrypted password? Any suggestion and pointers to the right direction will be of great help.

    If you enable SCRAM in ejabberd configuration file, the passwords will be stored scrammed (that is, encrypted).