summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-01-20 15:43:22 +0000
committerSimon MacMullen <simon@rabbitmq.com>2014-01-20 15:43:22 +0000
commitdaf6614588124114c42a9fabbcbb7c4d219a73d5 (patch)
tree3a8731a493ba36fe95d73ab0ad859cb1b08c92af /src
parent27caee24f04cac0ed557678ef09e9a9dab1a3591 (diff)
downloadrabbitmq-server-git-daf6614588124114c42a9fabbcbb7c4d219a73d5.tar.gz
Placate Matthias.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_access_control.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl
index 543309ba82..19171659e3 100644
--- a/src/rabbit_access_control.erl
+++ b/src/rabbit_access_control.erl
@@ -52,11 +52,7 @@ check_user_pass_login(Username, Password) ->
check_user_login(Username, AuthProps) ->
{ok, Modules} = application:get_env(rabbit, auth_backends),
lists:foldl(
- fun (Mod, {refused, _, _}) when is_atom(Mod) ->
- %% Same module for authN and authZ. Just take the result
- %% it gives us
- try_login(Mod, Username, AuthProps);
- ({ModN, ModZ}, {refused, _, _}) ->
+ fun ({ModN, ModZ}, {refused, _, _}) ->
%% Different modules for authN vs authZ. So authenticate
%% with authN module, then if that succeeds do
%% passwordless (i.e pre-authenticated) login with authZ
@@ -65,6 +61,10 @@ check_user_login(Username, AuthProps) ->
{ok, _} -> try_login(ModZ, Username, []);
Else -> Else
end;
+ (Mod, {refused, _, _}) ->
+ %% Same module for authN and authZ. Just take the result
+ %% it gives us
+ try_login(Mod, Username, AuthProps);
(_, {ok, User}) ->
%% We've successfully authenticated. Skip to the end...
{ok, User}