ldap

package
Version: v0.0.65 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 9 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 {
	Enabled           bool   `yaml:"enabled"`
	LdapHost          string `yaml:"ldapHost"`
	LdapPort          int    `yaml:"ldapPort"`
	TLS               bool   `yaml:"use_tls"`
	BindDN            string `yaml:"bindDN"`
	BindPassword      string `yaml:"bindPwd,omitempty"`
	UserSearchBase    string `yaml:"userSearchBase"`
	UserNameAttribute string `yaml:"userNameAttribute"`
	UserMailAttribute string `yaml:"userMailAttribute"`
	UserObjectClass   string `yaml:"userObjectClass"`
	GroupSearchBase   string `yaml:"groupSearchBase"`
	GroupAttribute    string `yaml:"groupAttribute"`
	Origin            string `yaml:"origin"`
}

Config -

type DefaultManager

type DefaultManager struct {
}

DefaultManager -

func (*DefaultManager) EscapeFilterValue added in v0.0.30

func (m *DefaultManager) EscapeFilterValue(filter string) string

func (*DefaultManager) GetConfig added in v0.0.29

func (m *DefaultManager) GetConfig(configDir, ldapBindPassword string) (*Config, error)

func (*DefaultManager) GetLdapUser added in v0.0.30

func (m *DefaultManager) GetLdapUser(config *Config, userDN, userSearchBase string) (*User, error)

func (*DefaultManager) GetUser added in v0.0.29

func (m *DefaultManager) GetUser(config *Config, userID string) (*User, error)

func (*DefaultManager) GetUserIDs

func (m *DefaultManager) GetUserIDs(config *Config, groupName string) ([]User, error)

GetUserIDs -

func (*DefaultManager) LdapConnection added in v0.0.43

func (m *DefaultManager) LdapConnection(config *Config) (*l.Conn, error)

func (*DefaultManager) UnescapeFilterValue added in v0.0.30

func (m *DefaultManager) UnescapeFilterValue(filter string) string

type Manager

type Manager interface {
	GetUserIDs(config *Config, groupName string) (users []User, err error)
	GetUser(config *Config, userID string) (*User, error)
	GetConfig(configDir, ldapBindPassword string) (*Config, error)
	GetLdapUser(config *Config, userDN, userSearchBase string) (*User, error)
	LdapConnection(config *Config) (*l.Conn, error)
}

Manager -

func NewManager added in v0.0.29

func NewManager() Manager

type User

type User struct {
	UserDN string
	UserID string
	Email  string
}

User -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL