Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) BindUser(uid, password string) (*ldap.Conn, error)
- func (c *Config) Dial() (*ldap.Conn, error)
- func (c *Config) DialBound() (*ldap.Conn, error)
- func (c *Config) SearchUser(id string, fields ...string) (map[string][]string, error)
- func (c *Config) SearchUserGroups(id string) ([]string, error)
- func (c *Config) UpdatePassword(uid string, password string) error
- type Service
- func (s *Service) Execute(us *usersystem.UserSystem) error
- func (s *Service) MustGetProfile(id string) *profile.Profile
- func (s *Service) MustUpdatePassword(uid string, password string)
- func (s *Service) MustUpdateProfile(id string, p *profile.Profile)
- func (s *Service) MustVerifyPassword(uid string, password string) bool
- func (s *Service) PasswordChangeable() bool
- func (s *Service) Purge(string) error
- func (s *Service) Start() error
- func (s *Service) Stop() error
Constants ¶
This section is empty.
Variables ¶
View Source
var DirectiveFactory = func(loader func(v interface{}) error) (usersystem.Directive, error) { s := &Service{} err := loader(s) if err != nil { return nil, err } return s, nil }
DirectiveFactory factory to create ldapuser directive
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Net string
Addr string
UserPattern string
BindDN string
BindPass string
SearchDN string
SearchFilter string
GroupDN string
GroupIDField string
GroupFilter string
}
Config ldap user config struct example: Net: "tcp", Addr: "127.0.0.1:389", UserPattern: "uid=%s,ou=People,dc=example", BindDN: "cn=admin,dc=example", BindPass: "password", SearchDN: "ou=People,dc=example", SearchFilter: "(uid=%s)", GroupDN: "ou=Group,dc=example", GroupFilter: "(member=%s)", GroupIDField: "cn",
func (*Config) SearchUser ¶
type Service ¶
func (*Service) Execute ¶
func (s *Service) Execute(us *usersystem.UserSystem) error
func (*Service) MustUpdatePassword ¶
func (*Service) MustUpdateProfile ¶
func (*Service) MustVerifyPassword ¶
func (*Service) PasswordChangeable ¶
PasswordChangeable return password changeable
Click to show internal directories.
Click to hide internal directories.