Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
Merge bug 25688
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon MacMullen committed Jul 30, 2013
2 parents aad60ec + 91e7fc5 commit 54cc5e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/amqp_auth_mechanisms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

-include("amqp_client.hrl").

-export([plain/3, amqplain/3, external/3]).
-export([plain/3, amqplain/3, external/3, crdemo/3]).

%%---------------------------------------------------------------------------

Expand All @@ -41,3 +41,11 @@ external(none, _, init) ->
{<<"EXTERNAL">>, []};
external(none, _, _State) ->
{<<"">>, _State}.

crdemo(none, _, init) ->
{<<"RABBIT-CR-DEMO">>, 0};
crdemo(none, #amqp_params_network{username = Username}, 0) ->
{Username, 1};
crdemo(<<"Please tell me your password">>,
#amqp_params_network{password = Password}, 1) ->
{<<"My password is ", Password/binary>>, 2}.
2 changes: 2 additions & 0 deletions src/amqp_network_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ handshake_recv(Expecting) ->
case {Expecting, element(1, Method)} of
{E, M} when E =:= M ->
Method;
{'connection.tune', 'connection.secure'} ->
Method;
{'connection.open_ok', _} ->
{closing,
#amqp_error{name = command_invalid,
Expand Down

0 comments on commit 54cc5e1

Please sign in to comment.