25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

ejabberd_auth*: Fix indentation

This commit is contained in:
Holger Weiss 2016-05-24 00:40:25 +02:00
parent 2a9dd548b5
commit a2f0e157bc
3 changed files with 54 additions and 56 deletions

View File

@ -81,9 +81,11 @@ check_password(User, AuthzId, Server, Password) ->
false;
true ->
case get_cache_option(Server) of
false -> check_password_extauth(User, AuthzId, Server, Password);
false ->
check_password_extauth(User, AuthzId, Server, Password);
{true, CacheTime} ->
check_password_cache(User, AuthzId, Server, Password, CacheTime)
check_password_cache(User, AuthzId, Server, Password,
CacheTime)
end
end.

View File

@ -122,8 +122,7 @@ check_password(User, AuthzId, Server, Password) ->
true ->
if Password == <<"">> -> false;
true ->
case catch check_password_ldap(User, Server, Password)
of
case catch check_password_ldap(User, Server, Password) of
{'EXIT', _} -> false;
Result -> Result
end

View File

@ -97,11 +97,9 @@ check_password(User, AuthzId, Server, Password) ->
LServer = jid:nameprep(Server),
US = {LUser, LServer},
case catch mnesia:dirty_read({passwd, US}) of
[#passwd{password = Password}]
when is_binary(Password) ->
[#passwd{password = Password}] when is_binary(Password) ->
Password /= <<"">>;
[#passwd{password = Scram}]
when is_record(Scram, scram) ->
[#passwd{password = Scram}] when is_record(Scram, scram) ->
is_password_scram_valid(Password, Scram);
_ -> false
end
@ -124,8 +122,7 @@ check_password(User, AuthzId, Server, Password, Digest,
if DigRes -> true;
true -> (Passwd == Password) and (Password /= <<"">>)
end;
[#passwd{password = Scram}]
when is_record(Scram, scram) ->
[#passwd{password = Scram}] when is_record(Scram, scram) ->
Passwd = jlib:decode_base64(Scram#scram.storedkey),
DigRes = if Digest /= <<"">> ->
Digest == DigestGen(Passwd);