refactor(gateway): re-use `emqx_authentication_config:authenticator_id/1`

This commit is contained in:
Thales Macedo Garitezi 2022-04-05 13:28:24 -03:00
parent af4ad5721f
commit bdc1253d96
No known key found for this signature in database
GPG Key ID: DD279F8152A9B6DD
1 changed files with 2 additions and 4 deletions

View File

@ -123,12 +123,10 @@ get_basic_usage_info() ->
%% Internal funcs
%%--------------------------------------------------------------------
get_authn_type(#{authentication := #{mechanism := Mechanism, backend := Backend}}) when
get_authn_type(#{authentication := Authn = #{mechanism := Mechanism, backend := Backend}}) when
is_atom(Mechanism), is_atom(Backend)
->
MechanismBin = atom_to_binary(Mechanism),
BackendBin = atom_to_binary(Backend),
<<MechanismBin/binary, ":", BackendBin/binary>>;
emqx_authentication_config:authenticator_id(Authn);
get_authn_type(_) ->
<<"undefined">>.