2017-08-16 14:37:37 -07:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
2016-04-16 11:39:43 -07:00
|
|
|
// See License.txt for license information.
|
|
|
|
|
|
|
|
package einterfaces
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mattermost/platform/model"
|
|
|
|
)
|
|
|
|
|
|
|
|
type LdapInterface interface {
|
2016-05-15 14:02:30 -07:00
|
|
|
DoLogin(id string, password string) (*model.User, *model.AppError)
|
2016-04-16 11:39:43 -07:00
|
|
|
GetUser(id string) (*model.User, *model.AppError)
|
|
|
|
CheckPassword(id string, password string) *model.AppError
|
2016-05-15 14:02:30 -07:00
|
|
|
SwitchToLdap(userId, ldapId, ldapPassword string) *model.AppError
|
|
|
|
ValidateFilter(filter string) *model.AppError
|
2016-06-23 11:28:05 -07:00
|
|
|
Syncronize() *model.AppError
|
|
|
|
StartLdapSyncJob()
|
2016-08-15 09:47:31 -07:00
|
|
|
SyncNow()
|
2016-09-17 06:19:18 -07:00
|
|
|
RunTest() *model.AppError
|
2016-08-15 09:47:31 -07:00
|
|
|
GetAllLdapUsers() ([]*model.User, *model.AppError)
|
2016-04-16 11:39:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
var theLdapInterface LdapInterface
|
|
|
|
|
|
|
|
func RegisterLdapInterface(newInterface LdapInterface) {
|
|
|
|
theLdapInterface = newInterface
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetLdapInterface() LdapInterface {
|
|
|
|
return theLdapInterface
|
|
|
|
}
|