From 78c2c53daa8b552b691f74b0fb2919f1dab654f0 Mon Sep 17 00:00:00 2001 From: Zhongwen Deng Date: Wed, 10 May 2023 18:43:57 +0800 Subject: [PATCH] fix: authn init is empty --- apps/emqx_authn/src/emqx_authn_app.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/emqx_authn/src/emqx_authn_app.erl b/apps/emqx_authn/src/emqx_authn_app.erl index 44fec2363..365535b77 100644 --- a/apps/emqx_authn/src/emqx_authn_app.erl +++ b/apps/emqx_authn/src/emqx_authn_app.erl @@ -23,7 +23,9 @@ %% Application callbacks -export([ start/2, - stop/1 + stop/1, + chain_configs/0, + initialize/0 ]). -include_lib("emqx/include/emqx_authentication.hrl"). @@ -54,6 +56,7 @@ stop(_State) -> initialize() -> ok = ?AUTHN:register_providers(emqx_authn:providers()), + io:format("init:~p~n", [chain_configs()]), lists:foreach( fun({ChainName, AuthConfig}) -> ?AUTHN:initialize_authentication( @@ -72,7 +75,7 @@ chain_configs() -> [global_chain_config() | listener_chain_configs()]. global_chain_config() -> - {?GLOBAL, emqx:get_config([?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_BINARY], [])}. + {?GLOBAL, emqx:get_config([?EMQX_AUTHENTICATION_CONFIG_ROOT_NAME_ATOM], [])}. listener_chain_configs() -> lists:map(