diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-01-20 15:43:22 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-01-20 15:43:22 +0000 |
commit | e3552492ffd12995194401e1a3d0345d15f6df50 (patch) | |
tree | 3a8731a493ba36fe95d73ab0ad859cb1b08c92af | |
parent | d25cbc7c6381c709c3032982dc5f4d690be15e66 (diff) | |
download | rabbitmq-server-bug25654.tar.gz |
Placate Matthias.bug25654
-rw-r--r-- | src/rabbit_access_control.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl index 543309ba..19171659 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} |