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,
[{description, "EMQ X Authentication with Mnesia"},
{vsn, "4.3.1"}, % strict semver, bump manually
{vsn, "4.3.2"}, % strict semver, bump manually
{modules, []},
{registered, []},
{applications, [kernel,stdlib,mnesia]},

View File

@ -2,12 +2,18 @@
{VSN,
[
{"4.3.1", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]},
{"4.3.0", [
{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", [
{load_module,emqx_auth_mnesia_api, brutal_purge,soft_purge,[]}
]},

View File

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