fix(ldap): handle invalidCredentials in ldap authn
This commit is contained in:
parent
9ee2cb9c79
commit
4a4730ad46
|
@ -102,8 +102,14 @@ authenticate(
|
|||
{bind, Entry#eldap_entry.object_name, Credential}
|
||||
)
|
||||
of
|
||||
ok ->
|
||||
{ok, #{result := ok}} ->
|
||||
{ok, #{is_superuser => false}};
|
||||
{ok, #{result := 'invalidCredentials'}} ->
|
||||
?TRACE_AUTHN_PROVIDER(error, "ldap_bind_failed", #{
|
||||
resource => ResourceId,
|
||||
reason => 'invalidCredentials'
|
||||
}),
|
||||
{error, bad_username_or_password};
|
||||
{error, Reason} ->
|
||||
?TRACE_AUTHN_PROVIDER(error, "ldap_bind_failed", #{
|
||||
resource => ResourceId,
|
||||
|
|
Loading…
Reference in New Issue