mirror of
https://github.com/h44z/wg-portal.git
synced 2025-10-04 07:26:18 +00:00
improve logging of LDAP login process even more (#529)
This commit is contained in:
@@ -113,10 +113,13 @@ func (l LdapAuthenticator) GetUserInfo(_ context.Context, userId domain.UserIden
|
||||
}
|
||||
|
||||
if len(sr.Entries) == 0 {
|
||||
slog.Debug("LDAP user not found", "source", l.GetName(), "userId", userId, "filter", loginFilter)
|
||||
return nil, domain.ErrNotFound
|
||||
}
|
||||
|
||||
if len(sr.Entries) > 1 {
|
||||
slog.Debug("LDAP user not unique",
|
||||
"source", l.GetName(), "userId", userId, "filter", loginFilter, "entries", len(sr.Entries))
|
||||
return nil, domain.ErrNotUnique
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user