fix(logs): print the correct username and clientid
This commit is contained in:
parent
17ee5b0af5
commit
f59377adf5
|
@ -1187,11 +1187,10 @@ check_banned(_ConnPkt, #channel{clientinfo = ClientInfo = #{zone := Zone}}) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Auth Connect
|
%% Auth Connect
|
||||||
|
|
||||||
auth_connect(#mqtt_packet_connect{clientid = ClientId,
|
auth_connect(#mqtt_packet_connect{password = Password},
|
||||||
username = Username,
|
|
||||||
password = Password
|
|
||||||
},
|
|
||||||
#channel{clientinfo = ClientInfo} = Channel) ->
|
#channel{clientinfo = ClientInfo} = Channel) ->
|
||||||
|
#{clientid := ClientId,
|
||||||
|
username := Username} = ClientInfo,
|
||||||
case emqx_access_control:authenticate(ClientInfo#{password => Password}) of
|
case emqx_access_control:authenticate(ClientInfo#{password => Password}) of
|
||||||
{ok, AuthResult} ->
|
{ok, AuthResult} ->
|
||||||
is_anonymous(AuthResult) andalso
|
is_anonymous(AuthResult) andalso
|
||||||
|
|
Loading…
Reference in New Issue