Add missing new methods to fulfill ldap.Client interface

This commit is contained in:
Ralf Haferkamp
2022-08-02 15:34:59 +02:00
parent aaa3143cb4
commit fa36a73c54
3 changed files with 65 additions and 1 deletions
@@ -317,3 +317,18 @@ func (c ConnWithReconnect) Compare(dn, attribute, value string) (bool, error) {
func (c ConnWithReconnect) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) {
return nil, ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// NTLMUnauthenticatedBind implements the ldap.Client interface
func (c ConnWithReconnect) NTLMUnauthenticatedBind(domain, username string) error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
// TLSConnectionState implements the ldap.Client interface
func (c ConnWithReconnect) TLSConnectionState() (tls.ConnectionState, bool) {
return tls.ConnectionState{}, false
}
// Unbind implements the ldap.Client interface
func (c ConnWithReconnect) Unbind() error {
return ldap.NewError(ldap.LDAPResultNotSupported, fmt.Errorf("not implemented"))
}
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
)
// ldapMock implements the ldap.Client interfac
// ldapMock implements the ldap.Client interface
type ldapMock struct {
SearchFunc *searchFunc
}