chore(auth mnesia): hide the password in the api

This commit is contained in:
zhanghongtong 2021-07-23 16:55:27 +08:00 committed by turtleDeng
parent b851a7ea7c
commit a9a1c71eb4
3 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{application, emqx_auth_mnesia, {application, emqx_auth_mnesia,
[{description, "EMQ X Authentication with Mnesia"}, [{description, "EMQ X Authentication with Mnesia"},
{vsn, "4.3.1"}, % strict semver, bump manually {vsn, "4.3.2"}, % strict semver, bump manually
{modules, []}, {modules, []},
{registered, []}, {registered, []},
{applications, [kernel,stdlib,mnesia]}, {applications, [kernel,stdlib,mnesia]},

View File

@ -2,12 +2,18 @@
{VSN, {VSN,
[ [
{"4.3.1", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]},
{"4.3.0", [ {"4.3.0", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]} {load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]}, ]},
{<<".*">>, []} {<<".*">>, []}
], ],
[ [
{"4.3.1", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]},
{"4.3.0", [ {"4.3.0", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]} {load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]}, ]},

View File

@ -263,13 +263,11 @@ limit(Params) ->
%% Interval Funcs %% Interval Funcs
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
format([{?TABLE, {clientid, ClientId}, Password, _InterTime}]) -> format([{?TABLE, {clientid, ClientId}, _Password, _InterTime}]) ->
#{clientid => ClientId, #{clientid => ClientId};
password => Password};
format([{?TABLE, {username, Username}, Password, _InterTime}]) -> format([{?TABLE, {username, Username}, _Password, _InterTime}]) ->
#{username => Username, #{username => Username};
password => Password};
format([]) -> format([]) ->
#{}. #{}.