diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2013-02-27 11:56:11 +0000 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2013-02-27 11:56:11 +0000 |
| commit | f947bb1700f40f5176ead3ed085a0cac1586a9a2 (patch) | |
| tree | a7769b9ab5cba08e69692cc46fb502ac366d055f /src | |
| parent | 3b8e66fb902ecd44581a87600bf7e42535ac5583 (diff) | |
| parent | fa6c27d92bf518196291d7c785a9161f842ebe67 (diff) | |
| download | rabbitmq-server-git-f947bb1700f40f5176ead3ed085a0cac1586a9a2.tar.gz | |
Merged bug25463 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_reader.erl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 6294451b91..aaaa179a55 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -787,7 +787,7 @@ handle_method0(#'connection.start_ok'{mechanism = Mechanism, Connection#connection{ client_properties = ClientProperties, capabilities = Capabilities, - auth_mechanism = AuthMechanism, + auth_mechanism = {Mechanism, AuthMechanism}, auth_state = AuthMechanism:init(Sock)}}, auth_phase(Response, State); @@ -915,15 +915,14 @@ auth_mechanisms_binary(Sock) -> auth_phase(Response, State = #v1{connection = Connection = #connection{protocol = Protocol, - auth_mechanism = AuthMechanism, + auth_mechanism = {Name, AuthMechanism}, auth_state = AuthState}, sock = Sock}) -> case AuthMechanism:handle_response(Response, AuthState) of {refused, Msg, Args} -> rabbit_misc:protocol_error( access_refused, "~s login refused: ~s", - [proplists:get_value(name, AuthMechanism:description()), - io_lib:format(Msg, Args)]); + [Name, io_lib:format(Msg, Args)]); {protocol_error, Msg, Args} -> rabbit_misc:protocol_error(syntax_error, Msg, Args); {challenge, Challenge, AuthState1} -> @@ -983,10 +982,8 @@ ic(vhost, #connection{vhost = VHost}) -> VHost; ic(timeout, #connection{timeout_sec = Timeout}) -> Timeout; ic(frame_max, #connection{frame_max = FrameMax}) -> FrameMax; ic(client_properties, #connection{client_properties = CP}) -> CP; -ic(auth_mechanism, #connection{auth_mechanism = none}) -> - none; -ic(auth_mechanism, #connection{auth_mechanism = Mechanism}) -> - proplists:get_value(name, Mechanism:description()); +ic(auth_mechanism, #connection{auth_mechanism = none}) -> none; +ic(auth_mechanism, #connection{auth_mechanism = {Name, _Mod}}) -> Name; ic(Item, #connection{}) -> throw({bad_argument, Item}). socket_info(Get, Select, #v1{sock = Sock}) -> |
