Merge branch 'master' into improve-authn

This commit is contained in:
zhongwencool 2023-06-01 22:24:59 +08:00 committed by GitHub
commit 21df321d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -301,14 +301,15 @@ get_raw([], Default) -> do_get_raw([], Default).
put_raw(Config) ->
maps:fold(
fun(RootName, RootV, _) ->
?MODULE:put_raw([RootName], RootV)
?MODULE:put_raw([bin(RootName)], RootV)
end,
ok,
hocon_maps:ensure_plain(Config)
).
-spec put_raw(emqx_utils_maps:config_key_path(), term()) -> ok.
put_raw(KeyPath, Config) ->
put_raw(KeyPath0, Config) ->
KeyPath = [bin(K) || K <- KeyPath0],
Putter = fun(Path, Map, Value) ->
emqx_utils_maps:deep_force_put(Path, Map, Value)
end,

View File

@ -297,6 +297,7 @@ t_update_config({init, Config}) ->
];
t_update_config(Config) when is_list(Config) ->
emqx_config_handler:add_handler([?CONF_ROOT], emqx_authentication_config),
ok = emqx_config_handler:add_handler([listeners, '?', '?', ?CONF_ROOT], emqx_authentication_config),
ok = register_provider(?config("auth1"), ?MODULE),
ok = register_provider(?config("auth2"), ?MODULE),
Global = ?config(global),

View File

@ -279,7 +279,7 @@ does_module_exist(Mod) ->
clear_listeners() ->
emqx_config:put([listeners], #{}),
emqx_config:put_raw([listeners], #{}),
emqx_config:put_raw([<<"listeners">>], #{}),
ok.
assert_http_get(URL) ->