ldap

package
v0.0.0-...-ee09c68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Base               string
	Host               string
	ServerName         string
	Port               int
	BindDN             string
	BindPassword       string
	UserFilter         string
	GroupFilter        string
	Attributes         []string
	InsecureSkipVerify bool
	DisplayNameAttr    string
	EmailAttr          string
	PoolCapacity       int
	GetMoreUserInfo    func(client *ldapclient.LDAPClient, attrs map[string]string) (map[string]string, error)
}

type Pool

type Pool interface {
	Close()
	Get() (*ldapclient.LDAPClient, error)
	Put(*ldapclient.LDAPClient) error
}

func NewPool

func NewPool(config Config) Pool

type UserInfo

type UserInfo struct {
	ID         string
	Name       string
	Email      string
	Attributes map[string]string
}

type UserStore

type UserStore struct {
	// contains filtered or unexported fields
}

func NewUserStore

func NewUserStore(pool Pool, config Config) *UserStore

func (*UserStore) Close

func (us *UserStore) Close()

func (*UserStore) FindUserByID

func (us *UserStore) FindUserByID(userID string) (*UserInfo, error)

func (*UserStore) ValidateCredentials

func (us *UserStore) ValidateCredentials(username, password string) (*UserInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL