mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-03 14:45:16 +02:00
3202705ad6
* src/mod_vcard.erl: Bugfix * src/ejabberd_app.erl: Updated to allow different authentication methods for different virtual hosts * src/ejabberd_auth.erl: Likewise * src/ejabberd_auth_external.erl: Likewise * src/ejabberd_auth_internal.erl: Likewise * src/ejabberd_auth_ldap.erl: Likewise * src/ejabberd_auth_odbc.erl: Likewise * src/cyrsasl.erl: Likewise * src/cyrsasl_digest.erl: Likewise * src/cyrsasl_plain.erl: Likewise * src/ejabberd_c2s.erl: Likewise * src/ejabberd_config.erl: Likewise * src/extauth.erl: Likewise * src/mod_last_odbc.erl: Likewise * src/mod_offline_odbc.erl: Likewise * src/mod_roster_odbc.erl: Likewise * src/odbc/ejabberd_odbc.erl: Likewise * src/odbc/ejabberd_odbc_sup.erl: Likewise SVN Revision: 374
73 lines
1.8 KiB
Erlang
73 lines
1.8 KiB
Erlang
%%%----------------------------------------------------------------------
|
|
%%% File : ejabberd_auth_external.erl
|
|
%%% Author : Alexey Shchepin <alexey@sevcom.net>
|
|
%%% Purpose : Authentification via LDAP external script
|
|
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@sevcom.net>
|
|
%%% Id : $Id$
|
|
%%%----------------------------------------------------------------------
|
|
|
|
-module(ejabberd_auth_external).
|
|
-author('alexey@sevcom.net').
|
|
-vsn('$Revision$ ').
|
|
|
|
%% External exports
|
|
-export([start/1,
|
|
set_password/3,
|
|
check_password/3,
|
|
check_password/5,
|
|
try_register/3,
|
|
dirty_get_registered_users/0,
|
|
get_vh_registered_users/1,
|
|
get_password/2,
|
|
get_password_s/2,
|
|
is_user_exists/2,
|
|
remove_user/2,
|
|
remove_user/3,
|
|
plain_password_required/0
|
|
]).
|
|
|
|
%%%----------------------------------------------------------------------
|
|
%%% API
|
|
%%%----------------------------------------------------------------------
|
|
start(Host) ->
|
|
extauth:start(
|
|
Host, ejabberd_config:get_local_option({extauth_program, Host})),
|
|
ok.
|
|
|
|
plain_password_required() ->
|
|
true.
|
|
|
|
check_password(User, Server, Password) ->
|
|
extauth:check_password(User, Server, Password).
|
|
|
|
check_password(User, Server, Password, _StreamID, _Digest) ->
|
|
check_password(User, Server, Password).
|
|
|
|
set_password(User, Server, Password) ->
|
|
extauth:set_password(User, Server, Password).
|
|
|
|
try_register(_User, _Server, _Password) ->
|
|
{error, not_allowed}.
|
|
|
|
dirty_get_registered_users() ->
|
|
[].
|
|
|
|
get_vh_registered_users(_Server) ->
|
|
[].
|
|
|
|
get_password(_User, _Server) ->
|
|
false.
|
|
|
|
get_password_s(_User, _Server) ->
|
|
"".
|
|
|
|
is_user_exists(User, Server) ->
|
|
extauth:is_user_exists(User, Server).
|
|
|
|
remove_user(_User, _Server) ->
|
|
{error, not_allowed}.
|
|
|
|
remove_user(_User, _Server, _Password) ->
|
|
not_allowed.
|
|
|