fix(ldap-sso): do not log error level when invalid user credentials
This commit is contained in:
parent
39820be5ff
commit
b28e781c50
|
@ -131,8 +131,10 @@ login(
|
|||
{bind, Entry#eldap_entry.object_name, Sign}
|
||||
)
|
||||
of
|
||||
ok ->
|
||||
{ok, #{result := ok}} ->
|
||||
ensure_user_exists(Username);
|
||||
{ok, #{result := invalidCredentials} = Reason} ->
|
||||
{error, Reason};
|
||||
{error, _} = Error ->
|
||||
Error
|
||||
end;
|
||||
|
|
|
@ -249,7 +249,7 @@ do_ldap_query(
|
|||
#{pool_name := PoolName} = State
|
||||
) ->
|
||||
LogMeta = #{connector => InstId, search => SearchOptions, state => emqx_utils:redact(State)},
|
||||
?TRACE("QUERY", "ldap_connector_received", LogMeta),
|
||||
?TRACE("QUERY", "ldap_connector_received_query", LogMeta),
|
||||
case
|
||||
ecpool:pick_and_do(
|
||||
PoolName,
|
||||
|
|
|
@ -80,7 +80,9 @@ on_query(
|
|||
ldap_connector_query_return,
|
||||
#{result => ok}
|
||||
),
|
||||
ok;
|
||||
{ok, #{result => ok}};
|
||||
{error, invalidCredentials} ->
|
||||
{ok, #{result => invalidCredentials}};
|
||||
{error, Reason} ->
|
||||
?SLOG(
|
||||
error,
|
||||
|
|
Loading…
Reference in New Issue