[ejabberd] Custom Erlang authentication module

William Key williamkey at gmail.com
Tue Nov 16 23:57:26 MSK 2010


The exports returned:

Exports:
check_password/3              is_user_exists/2
check_password/5              module_info/0
dirty_get_registered_users/0  module_info/1
get_password/2                plain_password_required/0
get_password_s/2              remove_user/2
get_vh_registered_users/1     remove_user/3
get_vh_registered_users/2     set_password/3
get_vh_registered_users_numberstart/1
get_vh_registered_users_numbertry_register/3
ok

check_password() returned false (as expected, as I still haven't fully
implemented everything) and the ?INFO_MSG was called. When
actually authenticating with the server the ?INFO_MSG does not show up in
the logs at all.

Thanks,
William


2010/11/16 Boris Okner <boris.okner at gmail.com>

> Hmm...I haven't used 2.0.1, but by looking at the code, it should still
> work. I would recommend to fire off debug session, something like:
>
> sudo ejabberdctl debug
>
> and then from Erlang shell do:
>
> m(ejabberd_auth_authtest).
>
> If you see that your module was found, and the info looks right, try:
>
> User = "your_user_name",
> Server = "your_domain_name",
> Password = "your_password",
> ejabberd_auth_authtest:check_password(User, Server, Password).
>
> This will verify if your module does authentication as expected.
> We can go from there.
>
> Cheers,
> Boris
>
> On Tue, Nov 16, 2010 at 3:27 PM, William Key <williamkey at gmail.com> wrote:
>
>> Thanks for the quick response. My configuration has every auth_method
>> commented out except
>> mine which is {auth_method, authtest}. Is there anything specific I should
>> be doing other than compiling
>>  the module and moving it to the Ejabberd ebin directory? It has the same
>> functions as the odbc auth module
>> and the functions are exported. The filename is ejabberd_auth_authtest.
>>
>> I'm still able to authenticate with Ejabberd even though my module
>> wouldn't allow it. I've completely restarted
>> the server multiple times as well. Note: I'm using Ejabberd 2.0.1-6+lenny2
>> (Ejabberd Debian package)
>>
>> Thanks,
>> William
>>
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20101116/9d86bcab/attachment-0001.html>


More information about the ejabberd mailing list