matterbridge/vendor/github.com/mattermost/platform/einterfaces/ldap.go

31 lines
813 B
Go
Raw Normal View History

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