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}
|
{bind, Entry#eldap_entry.object_name, Credential}
|
||||||
)
|
)
|
||||||
of
|
of
|
||||||
ok ->
|
{ok, #{result := ok}} ->
|
||||||
{ok, #{is_superuser => false}};
|
{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} ->
|
{error, Reason} ->
|
||||||
?TRACE_AUTHN_PROVIDER(error, "ldap_bind_failed", #{
|
?TRACE_AUTHN_PROVIDER(error, "ldap_bind_failed", #{
|
||||||
resource => ResourceId,
|
resource => ResourceId,
|
||||||
|
|
Loading…
Reference in New Issue