summaryrefslogtreecommitdiff
path: root/src/rabbit_auth_mechanism_cr_demo.erl
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-03-16 07:18:40 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2011-03-16 07:18:40 +0000
commit11681ae6031b69432626e7d92a699b07dd021c95 (patch)
treedbcca575b7fbb7e904444b5704d0860998ed1a93 /src/rabbit_auth_mechanism_cr_demo.erl
parent0e03d63fa6b9236744374041738f9c59182be325 (diff)
downloadrabbitmq-server-11681ae6031b69432626e7d92a699b07dd021c95.tar.gz
cosmetic
Diffstat (limited to 'src/rabbit_auth_mechanism_cr_demo.erl')
-rw-r--r--src/rabbit_auth_mechanism_cr_demo.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_auth_mechanism_cr_demo.erl b/src/rabbit_auth_mechanism_cr_demo.erl
index 77aa34ea..acbb6e48 100644
--- a/src/rabbit_auth_mechanism_cr_demo.erl
+++ b/src/rabbit_auth_mechanism_cr_demo.erl
@@ -53,10 +53,8 @@ handle_response(Response, State = #state{username = undefined}) ->
{challenge, <<"Please tell me your password">>,
State#state{username = Response}};
-handle_response(Response, #state{username = Username}) ->
- case Response of
- <<"My password is ", Password/binary>> ->
- rabbit_access_control:check_user_pass_login(Username, Password);
- _ ->
- {protocol_error, "Invalid response '~s'", [Response]}
- end.
+handle_response(<<"My password is ", Password/binary>>,
+ #state{username = Username}) ->
+ rabbit_access_control:check_user_pass_login(Username, Password);
+handle_response(Response, _State) ->
+ {protocol_error, "Invalid response '~s'", [Response]}.