LDAP: small improvements to various LDAP parts (#17662)

* Add multildap config example

* Publicize mocks for multildap module
This commit is contained in:
Oleg Gaidarenko
2019-06-19 15:46:04 +02:00
committed by GitHub
parent 17826796da
commit 1c08e58605
4 changed files with 160 additions and 64 deletions
+3 -3
View File
@@ -13,6 +13,9 @@ var GetConfig = ldap.GetConfig
// IsEnabled checks if LDAP is enabled
var IsEnabled = ldap.IsEnabled
// newLDAP return instance of the single LDAP server
var newLDAP = ldap.New
// ErrInvalidCredentials is returned if username and password do not match
var ErrInvalidCredentials = ldap.ErrInvalidCredentials
@@ -22,9 +25,6 @@ var ErrNoLDAPServers = errors.New("No LDAP servers are configured")
// ErrDidNotFindUser if request for user is unsuccessful
var ErrDidNotFindUser = errors.New("Did not find a user")
// newLDAP return instance of the single LDAP server
var newLDAP = ldap.New
// IMultiLDAP is interface for MultiLDAP
type IMultiLDAP interface {
Login(query *models.LoginUserQuery) (