feat: add configurable search filter

This commit is contained in:
Stavros
2025-07-05 15:22:09 +03:00
parent 0e43c50ac0
commit 01042a3003
3 changed files with 6 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ func (l *LDAP) Search(username string) (string, error) {
searchRequest := ldapgo.NewSearchRequest(
l.BaseDN,
ldapgo.ScopeWholeSubtree, ldapgo.NeverDerefAliases, 0, 0, false,
fmt.Sprintf("(uid=%s)", username),
fmt.Sprintf(l.Config.SearchFilter, username),
[]string{"dn"},
nil,
)