Update wrapper and mocks for go-ldap 3.4.6

This commit is contained in:
Ralf Haferkamp
2023-11-22 15:12:39 +01:00
committed by Ralf Haferkamp
parent 49db85d820
commit 6ac5ac534d
2 changed files with 69 additions and 0 deletions
@@ -4,6 +4,7 @@ package ldap
// https://gist.github.com/emsearcy/cba3295d1a06d4c432ab4f6173b65e4f#file-ldap_snippet-go
import (
"context"
"crypto/tls"
"errors"
"fmt"
@@ -336,6 +337,12 @@ func (c ConnWithReconnect) SearchWithPaging(searchRequest *ldap.SearchRequest, p
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// SearchAsync implements the ldap.Client interface
func (c ConnWithReconnect) SearchAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int) ldap.Response {
// unimplemented
return nil
}
// NTLMUnauthenticatedBind implements the ldap.Client interface
func (c ConnWithReconnect) NTLMUnauthenticatedBind(domain, username string) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
@@ -355,3 +362,15 @@ func (c ConnWithReconnect) Unbind() error {
func (c ConnWithReconnect) DirSync(searchRequest *ldap.SearchRequest, flags, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) {
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// DirSyncAsync implements the ldap.Client interface
func (c ConnWithReconnect) DirSyncAsync(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, flags, maxAttrCount int64, cookie []byte) ldap.Response {
// unimplemented
return nil
}
// Syncrepl implements the ldap.Client interface
func (c ConnWithReconnect) Syncrepl(ctx context.Context, searchRequest *ldap.SearchRequest, bufferSize int, mode ldap.ControlSyncRequestMode, cookie []byte, reloadHint bool) ldap.Response {
// unimplemented
return nil
}