mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/ejabberd.cfg.example: Update of the example for anonymous.
Removed unnecessary parameter. * src/ejabberd_auth_anonymous.erl: Removed unnecessary parameter and bugfix. SVN Revision: 534
This commit is contained in:
parent
4797060eb9
commit
3cce56b9f8
@ -1,3 +1,10 @@
|
|||||||
|
2006-04-20 Mickael Remond <mickael.remond@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd.cfg.example: Update of the example for anonymous.
|
||||||
|
Removed unnecessary parameter.
|
||||||
|
* src/ejabberd_auth_anonymous.erl: Removed unnecessary parameter /
|
||||||
|
bugfix.
|
||||||
|
|
||||||
2006-04-19 Alexey Shchepin <alexey@sevcom.net>
|
2006-04-19 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/msgs/pl.msg: Updated (thanks to Andrzej Smyk)
|
* src/msgs/pl.msg: Updated (thanks to Andrzej Smyk)
|
||||||
|
@ -97,16 +97,13 @@
|
|||||||
% Host name:
|
% Host name:
|
||||||
{hosts, ["localhost"]}.
|
{hosts, ["localhost"]}.
|
||||||
|
|
||||||
|
|
||||||
%% Anonymous login support:
|
%% Anonymous login support:
|
||||||
%% anonymous_protocol: sasl_anon|login_anon|both
|
%% auth_method: anonymous
|
||||||
%% allow_multiple_connections: true|false
|
%% anonymous_protocol: sasl_anon|login_anon|both
|
||||||
%% anon_digest_password: "anonymous" (this is the default password that should
|
%% allow_multiple_connections: true|false
|
||||||
%% be use for digest login).
|
|
||||||
%%{host_config, "public.example.org", [{auth_method, anonymous},
|
%%{host_config, "public.example.org", [{auth_method, anonymous},
|
||||||
%% {allow_multiple_connections, false},
|
%% {allow_multiple_connections, false},
|
||||||
%% {anonymous_protocol, sasl_anon},
|
%% {anonymous_protocol, sasl_anon}]}.
|
||||||
%% {anon_digest_password, "anonymous"}]}.
|
|
||||||
%% To use both anonymous and internal authentication:
|
%% To use both anonymous and internal authentication:
|
||||||
%%{host_config, "public.example.org", [{auth_method, [anonymous, internal]}]}.
|
%%{host_config, "public.example.org", [{auth_method, [anonymous, internal]}]}.
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ start(Host) ->
|
|||||||
|
|
||||||
%% Return true if anonymous is allowed for host or false otherwise
|
%% Return true if anonymous is allowed for host or false otherwise
|
||||||
allow_anonymous(Host) ->
|
allow_anonymous(Host) ->
|
||||||
lists:member(anonymous, ejabberd_auth:auth_modules(Host)).
|
lists:member(?MODULE, ejabberd_auth:auth_modules(Host)).
|
||||||
|
|
||||||
%% Return true if anonymous mode is enabled and if anonymous protocol is SASL
|
%% Return true if anonymous mode is enabled and if anonymous protocol is SASL
|
||||||
%% anonymous protocol can be: sasl_anon|login_anon|both
|
%% anonymous protocol can be: sasl_anon|login_anon|both
|
||||||
@ -192,8 +192,7 @@ get_vh_registered_users(_Server) ->
|
|||||||
|
|
||||||
%% Return password of permanent user or false for anonymous users
|
%% Return password of permanent user or false for anonymous users
|
||||||
get_password(User, Server) ->
|
get_password(User, Server) ->
|
||||||
DefaultPassword = get_default_password(Server),
|
get_password(User, Server, "").
|
||||||
get_password(User, Server, DefaultPassword).
|
|
||||||
|
|
||||||
get_password(User, Server, DefaultValue) ->
|
get_password(User, Server, DefaultValue) ->
|
||||||
case anonymous_user_exist(User, Server) of
|
case anonymous_user_exist(User, Server) of
|
||||||
@ -205,13 +204,6 @@ get_password(User, Server, DefaultValue) ->
|
|||||||
false
|
false
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Return the default digest password from the config file
|
|
||||||
get_default_password(Host) ->
|
|
||||||
case ejabberd_config:get_local_option({anon_digest_password, Host}) of
|
|
||||||
undefined -> "";
|
|
||||||
Pass -> Pass
|
|
||||||
end.
|
|
||||||
|
|
||||||
%% Returns true if the user exists in the DB or if an anonymous user is logged
|
%% Returns true if the user exists in the DB or if an anonymous user is logged
|
||||||
%% under the given name
|
%% under the given name
|
||||||
is_user_exists(User, Server) ->
|
is_user_exists(User, Server) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user