|
|
@@ -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,
|