Documentation
¶
Index ¶
- Variables
- type LDAP
- type LDAPFakeService
- func (s *LDAPFakeService) Client() multildap.IMultiLDAP
- func (s *LDAPFakeService) Config() *ldap.Config
- func (s *LDAPFakeService) Login(query *login.LoginUserQuery) (*login.ExternalUserInfo, error)
- func (s *LDAPFakeService) ReloadConfig() error
- func (s *LDAPFakeService) User(username string) (*login.ExternalUserInfo, error)
- type LDAPImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnableToCreateLDAPClient = errors.New("unable to create LDAP client") ErrLDAPNotEnabled = errors.New("LDAP not enabled") )
Functions ¶
This section is empty.
Types ¶
type LDAP ¶
type LDAP interface {
ReloadConfig() error
Config() *ldap.Config
Client() multildap.IMultiLDAP
// Login authenticates the user against the LDAP server.
Login(query *login.LoginUserQuery) (*login.ExternalUserInfo, error)
// User searches for a user in the LDAP server.
User(username string) (*login.ExternalUserInfo, error)
}
LDAP is the interface for the LDAP service.
type LDAPFakeService ¶
type LDAPFakeService struct {
ExpectedConfig *ldap.Config
ExpectedClient multildap.IMultiLDAP
ExpectedError error
ExpectedUser *login.ExternalUserInfo
UserCalled bool
}
func NewLDAPFakeService ¶
func NewLDAPFakeService() *LDAPFakeService
func (*LDAPFakeService) Client ¶
func (s *LDAPFakeService) Client() multildap.IMultiLDAP
func (*LDAPFakeService) Config ¶
func (s *LDAPFakeService) Config() *ldap.Config
func (*LDAPFakeService) Login ¶
func (s *LDAPFakeService) Login(query *login.LoginUserQuery) (*login.ExternalUserInfo, error)
func (*LDAPFakeService) ReloadConfig ¶
func (s *LDAPFakeService) ReloadConfig() error
func (*LDAPFakeService) User ¶
func (s *LDAPFakeService) User(username string) (*login.ExternalUserInfo, error)
type LDAPImpl ¶
type LDAPImpl struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func (*LDAPImpl) Client ¶
func (s *LDAPImpl) Client() multildap.IMultiLDAP
func (*LDAPImpl) Login ¶
func (s *LDAPImpl) Login(query *login.LoginUserQuery) (*login.ExternalUserInfo, error)
func (*LDAPImpl) ReloadConfig ¶
Click to show internal directories.
Click to hide internal directories.