I have installed MongooseIM in a VM for testing. I am trying to do user authentication from from an external postgres database. When I register a new user using
mongooseimctl register user host password
It adds a new row in my users table of my database. However, when I try to connect using xmpp clients I get error:
{message,<<"column \"pass_details\" does not exist">>}
I have downloaded the schema from https://raw.githubusercontent.com/processone/ejabberd/master/sql/pg.sql and it doesnt have a "pass_details" column in its users table. I tried finding a schema specifically for MongooseIm but didnt find any. Is there a different schema for MongoosIM? or can I fix it just by adding the pass_details column ? what should be the value of the column then ? or is there some other ways to fix this?
2015-02-25 15:21:07.684 [debug] <0.1802.0>@ejabberd_commands:execute_command2:339 Executing command ejabberd_admin:register with Args=[<<"bob">>,<<"localhost">>,<<"PASSWORD">>]
2015-02-25 15:21:07.685 [debug] <0.1627.0>@ejabberd_odbc:sql_query_internal:574 Postres, Send query
[<<"select password, pass_details from users where username='">>,<<"bob">>,<<"';">>]
2015-02-25 15:21:07.695 [error] <0.1802.0>@ejabberd_auth:is_user_exists:346 The authentication module ejabberd_auth_odbc returned an error
when checking user <<"bob">> in server <<"localhost">>
Error message: [{severity,'ERROR'},{code,<<"42703">>},{message,<<"column \"pass_details\" does not exist">>},{position,18},{file,<<"parse_relation.c">>},{line,2655},{routine,<<"errorMissingColumn">>}]
2015-02-25 15:21:07.696 [debug] <0.1624.0>@ejabberd_odbc:sql_query_internal:574 Postres, Send query
[<<"insert into users(username, password) values ('">>,<<"bob">>,<<"', '">>,<<"PASSWORD">>,<<"');">>]