diff options
Diffstat (limited to 'internal/authentication/types.go')
| -rw-r--r-- | internal/authentication/types.go | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/internal/authentication/types.go b/internal/authentication/types.go index d1853d5f3..145a83818 100644 --- a/internal/authentication/types.go +++ b/internal/authentication/types.go @@ -1,59 +1,13 @@ package authentication import ( - "crypto/tls" "fmt" "net/mail" "net/url" - "time" - "github.com/go-ldap/ldap/v3" "golang.org/x/text/language" ) -// LDAPClientFactory an interface of factory of LDAP clients. -type LDAPClientFactory interface { - DialURL(addr string, opts ...ldap.DialOpt) (client LDAPClient, err error) -} - -// LDAPClient is a cut down version of the ldap.Client interface with just the methods we use. -// -// Methods added to this interface that have a direct correlation with one from ldap.Client should have the same signature. -type LDAPClient interface { - Close() (err error) - IsClosing() bool - SetTimeout(timeout time.Duration) - - TLSConnectionState() (state tls.ConnectionState, ok bool) - StartTLS(config *tls.Config) (err error) - - Unbind() (err error) - Bind(username, password string) (err error) - SimpleBind(request *ldap.SimpleBindRequest) (result *ldap.SimpleBindResult, err error) - MD5Bind(host string, username string, password string) (err error) - DigestMD5Bind(request *ldap.DigestMD5BindRequest) (result *ldap.DigestMD5BindResult, err error) - UnauthenticatedBind(username string) (err error) - ExternalBind() (err error) - NTLMBind(domain string, username string, password string) (err error) - NTLMUnauthenticatedBind(domain string, username string) (err error) - NTLMBindWithHash(domain string, username string, hash string) (err error) - NTLMChallengeBind(request *ldap.NTLMBindRequest) (result *ldap.NTLMBindResult, err error) - - Modify(request *ldap.ModifyRequest) (err error) - ModifyWithResult(request *ldap.ModifyRequest) (result *ldap.ModifyResult, err error) - ModifyDN(m *ldap.ModifyDNRequest) (err error) - PasswordModify(request *ldap.PasswordModifyRequest) (result *ldap.PasswordModifyResult, err error) - - Add(request *ldap.AddRequest) (err error) - Del(request *ldap.DelRequest) (err error) - - Search(request *ldap.SearchRequest) (result *ldap.SearchResult, err error) - SearchWithPaging(request *ldap.SearchRequest, pagingSize uint32) (result *ldap.SearchResult, err error) - Compare(dn string, attribute string, value string) (same bool, err error) - - WhoAmI(controls []ldap.Control) (result *ldap.WhoAmIResult, err error) -} - // UserDetails represent the details retrieved for a given user. type UserDetails struct { Username string |
