mirror of https://github.com/authelia/authelia.git
416 lines
15 KiB
Go
416 lines
15 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/authelia/authelia/v4/internal/authentication (interfaces: LDAPClient)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package authentication -destination ldap_client_mock_test.go -mock_names LDAPClient=MockLDAPClient github.com/authelia/authelia/v4/internal/authentication LDAPClient
|
|
//
|
|
|
|
// Package authentication is a generated GoMock package.
|
|
package authentication
|
|
|
|
import (
|
|
tls "crypto/tls"
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
ldap "github.com/go-ldap/ldap/v3"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockLDAPClient is a mock of LDAPClient interface.
|
|
type MockLDAPClient struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockLDAPClientMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockLDAPClientMockRecorder is the mock recorder for MockLDAPClient.
|
|
type MockLDAPClientMockRecorder struct {
|
|
mock *MockLDAPClient
|
|
}
|
|
|
|
// NewMockLDAPClient creates a new mock instance.
|
|
func NewMockLDAPClient(ctrl *gomock.Controller) *MockLDAPClient {
|
|
mock := &MockLDAPClient{ctrl: ctrl}
|
|
mock.recorder = &MockLDAPClientMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockLDAPClient) EXPECT() *MockLDAPClientMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Add mocks base method.
|
|
func (m *MockLDAPClient) Add(request *ldap.AddRequest) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Add", request)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Add indicates an expected call of Add.
|
|
func (mr *MockLDAPClientMockRecorder) Add(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockLDAPClient)(nil).Add), request)
|
|
}
|
|
|
|
// Bind mocks base method.
|
|
func (m *MockLDAPClient) Bind(username, password string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Bind", username, password)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Bind indicates an expected call of Bind.
|
|
func (mr *MockLDAPClientMockRecorder) Bind(username, password any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bind", reflect.TypeOf((*MockLDAPClient)(nil).Bind), username, password)
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockLDAPClient) Close() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close.
|
|
func (mr *MockLDAPClientMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLDAPClient)(nil).Close))
|
|
}
|
|
|
|
// Compare mocks base method.
|
|
func (m *MockLDAPClient) Compare(dn, attribute, value string) (bool, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Compare", dn, attribute, value)
|
|
ret0, _ := ret[0].(bool)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Compare indicates an expected call of Compare.
|
|
func (mr *MockLDAPClientMockRecorder) Compare(dn, attribute, value any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compare", reflect.TypeOf((*MockLDAPClient)(nil).Compare), dn, attribute, value)
|
|
}
|
|
|
|
// Del mocks base method.
|
|
func (m *MockLDAPClient) Del(request *ldap.DelRequest) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Del", request)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Del indicates an expected call of Del.
|
|
func (mr *MockLDAPClientMockRecorder) Del(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Del", reflect.TypeOf((*MockLDAPClient)(nil).Del), request)
|
|
}
|
|
|
|
// DigestMD5Bind mocks base method.
|
|
func (m *MockLDAPClient) DigestMD5Bind(request *ldap.DigestMD5BindRequest) (*ldap.DigestMD5BindResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "DigestMD5Bind", request)
|
|
ret0, _ := ret[0].(*ldap.DigestMD5BindResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DigestMD5Bind indicates an expected call of DigestMD5Bind.
|
|
func (mr *MockLDAPClientMockRecorder) DigestMD5Bind(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DigestMD5Bind", reflect.TypeOf((*MockLDAPClient)(nil).DigestMD5Bind), request)
|
|
}
|
|
|
|
// ExternalBind mocks base method.
|
|
func (m *MockLDAPClient) ExternalBind() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ExternalBind")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// ExternalBind indicates an expected call of ExternalBind.
|
|
func (mr *MockLDAPClientMockRecorder) ExternalBind() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExternalBind", reflect.TypeOf((*MockLDAPClient)(nil).ExternalBind))
|
|
}
|
|
|
|
// IsClosing mocks base method.
|
|
func (m *MockLDAPClient) IsClosing() bool {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "IsClosing")
|
|
ret0, _ := ret[0].(bool)
|
|
return ret0
|
|
}
|
|
|
|
// IsClosing indicates an expected call of IsClosing.
|
|
func (mr *MockLDAPClientMockRecorder) IsClosing() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsClosing", reflect.TypeOf((*MockLDAPClient)(nil).IsClosing))
|
|
}
|
|
|
|
// MD5Bind mocks base method.
|
|
func (m *MockLDAPClient) MD5Bind(host, username, password string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "MD5Bind", host, username, password)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// MD5Bind indicates an expected call of MD5Bind.
|
|
func (mr *MockLDAPClientMockRecorder) MD5Bind(host, username, password any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MD5Bind", reflect.TypeOf((*MockLDAPClient)(nil).MD5Bind), host, username, password)
|
|
}
|
|
|
|
// Modify mocks base method.
|
|
func (m *MockLDAPClient) Modify(request *ldap.ModifyRequest) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Modify", request)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Modify indicates an expected call of Modify.
|
|
func (mr *MockLDAPClientMockRecorder) Modify(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Modify", reflect.TypeOf((*MockLDAPClient)(nil).Modify), request)
|
|
}
|
|
|
|
// ModifyDN mocks base method.
|
|
func (m_2 *MockLDAPClient) ModifyDN(m *ldap.ModifyDNRequest) error {
|
|
m_2.ctrl.T.Helper()
|
|
ret := m_2.ctrl.Call(m_2, "ModifyDN", m)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// ModifyDN indicates an expected call of ModifyDN.
|
|
func (mr *MockLDAPClientMockRecorder) ModifyDN(m any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyDN", reflect.TypeOf((*MockLDAPClient)(nil).ModifyDN), m)
|
|
}
|
|
|
|
// ModifyWithResult mocks base method.
|
|
func (m *MockLDAPClient) ModifyWithResult(request *ldap.ModifyRequest) (*ldap.ModifyResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ModifyWithResult", request)
|
|
ret0, _ := ret[0].(*ldap.ModifyResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ModifyWithResult indicates an expected call of ModifyWithResult.
|
|
func (mr *MockLDAPClientMockRecorder) ModifyWithResult(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyWithResult", reflect.TypeOf((*MockLDAPClient)(nil).ModifyWithResult), request)
|
|
}
|
|
|
|
// NTLMBind mocks base method.
|
|
func (m *MockLDAPClient) NTLMBind(domain, username, password string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "NTLMBind", domain, username, password)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// NTLMBind indicates an expected call of NTLMBind.
|
|
func (mr *MockLDAPClientMockRecorder) NTLMBind(domain, username, password any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NTLMBind", reflect.TypeOf((*MockLDAPClient)(nil).NTLMBind), domain, username, password)
|
|
}
|
|
|
|
// NTLMBindWithHash mocks base method.
|
|
func (m *MockLDAPClient) NTLMBindWithHash(domain, username, hash string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "NTLMBindWithHash", domain, username, hash)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// NTLMBindWithHash indicates an expected call of NTLMBindWithHash.
|
|
func (mr *MockLDAPClientMockRecorder) NTLMBindWithHash(domain, username, hash any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NTLMBindWithHash", reflect.TypeOf((*MockLDAPClient)(nil).NTLMBindWithHash), domain, username, hash)
|
|
}
|
|
|
|
// NTLMChallengeBind mocks base method.
|
|
func (m *MockLDAPClient) NTLMChallengeBind(request *ldap.NTLMBindRequest) (*ldap.NTLMBindResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "NTLMChallengeBind", request)
|
|
ret0, _ := ret[0].(*ldap.NTLMBindResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// NTLMChallengeBind indicates an expected call of NTLMChallengeBind.
|
|
func (mr *MockLDAPClientMockRecorder) NTLMChallengeBind(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NTLMChallengeBind", reflect.TypeOf((*MockLDAPClient)(nil).NTLMChallengeBind), request)
|
|
}
|
|
|
|
// NTLMUnauthenticatedBind mocks base method.
|
|
func (m *MockLDAPClient) NTLMUnauthenticatedBind(domain, username string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "NTLMUnauthenticatedBind", domain, username)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// NTLMUnauthenticatedBind indicates an expected call of NTLMUnauthenticatedBind.
|
|
func (mr *MockLDAPClientMockRecorder) NTLMUnauthenticatedBind(domain, username any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NTLMUnauthenticatedBind", reflect.TypeOf((*MockLDAPClient)(nil).NTLMUnauthenticatedBind), domain, username)
|
|
}
|
|
|
|
// PasswordModify mocks base method.
|
|
func (m *MockLDAPClient) PasswordModify(request *ldap.PasswordModifyRequest) (*ldap.PasswordModifyResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "PasswordModify", request)
|
|
ret0, _ := ret[0].(*ldap.PasswordModifyResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// PasswordModify indicates an expected call of PasswordModify.
|
|
func (mr *MockLDAPClientMockRecorder) PasswordModify(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PasswordModify", reflect.TypeOf((*MockLDAPClient)(nil).PasswordModify), request)
|
|
}
|
|
|
|
// Search mocks base method.
|
|
func (m *MockLDAPClient) Search(request *ldap.SearchRequest) (*ldap.SearchResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Search", request)
|
|
ret0, _ := ret[0].(*ldap.SearchResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Search indicates an expected call of Search.
|
|
func (mr *MockLDAPClientMockRecorder) Search(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockLDAPClient)(nil).Search), request)
|
|
}
|
|
|
|
// SearchWithPaging mocks base method.
|
|
func (m *MockLDAPClient) SearchWithPaging(request *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SearchWithPaging", request, pagingSize)
|
|
ret0, _ := ret[0].(*ldap.SearchResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// SearchWithPaging indicates an expected call of SearchWithPaging.
|
|
func (mr *MockLDAPClientMockRecorder) SearchWithPaging(request, pagingSize any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchWithPaging", reflect.TypeOf((*MockLDAPClient)(nil).SearchWithPaging), request, pagingSize)
|
|
}
|
|
|
|
// SetTimeout mocks base method.
|
|
func (m *MockLDAPClient) SetTimeout(timeout time.Duration) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "SetTimeout", timeout)
|
|
}
|
|
|
|
// SetTimeout indicates an expected call of SetTimeout.
|
|
func (mr *MockLDAPClientMockRecorder) SetTimeout(timeout any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimeout", reflect.TypeOf((*MockLDAPClient)(nil).SetTimeout), timeout)
|
|
}
|
|
|
|
// SimpleBind mocks base method.
|
|
func (m *MockLDAPClient) SimpleBind(request *ldap.SimpleBindRequest) (*ldap.SimpleBindResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "SimpleBind", request)
|
|
ret0, _ := ret[0].(*ldap.SimpleBindResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// SimpleBind indicates an expected call of SimpleBind.
|
|
func (mr *MockLDAPClientMockRecorder) SimpleBind(request any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SimpleBind", reflect.TypeOf((*MockLDAPClient)(nil).SimpleBind), request)
|
|
}
|
|
|
|
// StartTLS mocks base method.
|
|
func (m *MockLDAPClient) StartTLS(config *tls.Config) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "StartTLS", config)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// StartTLS indicates an expected call of StartTLS.
|
|
func (mr *MockLDAPClientMockRecorder) StartTLS(config any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartTLS", reflect.TypeOf((*MockLDAPClient)(nil).StartTLS), config)
|
|
}
|
|
|
|
// TLSConnectionState mocks base method.
|
|
func (m *MockLDAPClient) TLSConnectionState() (tls.ConnectionState, bool) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "TLSConnectionState")
|
|
ret0, _ := ret[0].(tls.ConnectionState)
|
|
ret1, _ := ret[1].(bool)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// TLSConnectionState indicates an expected call of TLSConnectionState.
|
|
func (mr *MockLDAPClientMockRecorder) TLSConnectionState() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TLSConnectionState", reflect.TypeOf((*MockLDAPClient)(nil).TLSConnectionState))
|
|
}
|
|
|
|
// UnauthenticatedBind mocks base method.
|
|
func (m *MockLDAPClient) UnauthenticatedBind(username string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UnauthenticatedBind", username)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UnauthenticatedBind indicates an expected call of UnauthenticatedBind.
|
|
func (mr *MockLDAPClientMockRecorder) UnauthenticatedBind(username any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnauthenticatedBind", reflect.TypeOf((*MockLDAPClient)(nil).UnauthenticatedBind), username)
|
|
}
|
|
|
|
// Unbind mocks base method.
|
|
func (m *MockLDAPClient) Unbind() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Unbind")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Unbind indicates an expected call of Unbind.
|
|
func (mr *MockLDAPClientMockRecorder) Unbind() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unbind", reflect.TypeOf((*MockLDAPClient)(nil).Unbind))
|
|
}
|
|
|
|
// WhoAmI mocks base method.
|
|
func (m *MockLDAPClient) WhoAmI(controls []ldap.Control) (*ldap.WhoAmIResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "WhoAmI", controls)
|
|
ret0, _ := ret[0].(*ldap.WhoAmIResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// WhoAmI indicates an expected call of WhoAmI.
|
|
func (mr *MockLDAPClientMockRecorder) WhoAmI(controls any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WhoAmI", reflect.TypeOf((*MockLDAPClient)(nil).WhoAmI), controls)
|
|
}
|