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) Execute(s *member.Service) error
- func (c *Config) PasswordProvider() *PasswordProvider
- func (c *Config) ProfileProvider(fields ...string) *datastore.DataSource
- 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 PasswordProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var DirectiveFactory = func(loader func(v interface{}) error) (member.Directive, error) { d := &Config{} err := loader(d) if err != nil { return nil, err } return d, 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) PasswordProvider ¶
func (c *Config) PasswordProvider() *PasswordProvider
func (*Config) ProfileProvider ¶
func (c *Config) ProfileProvider(fields ...string) *datastore.DataSource
func (*Config) SearchUser ¶
type PasswordProvider ¶
type PasswordProvider struct {
Config *Config
}
func (*PasswordProvider) Execute ¶
func (p *PasswordProvider) Execute(service *member.Service) error
func (*PasswordProvider) PasswordChangeable ¶
func (p *PasswordProvider) PasswordChangeable() bool
PasswordChangeable return password changeable
func (*PasswordProvider) UpdatePassword ¶
func (p *PasswordProvider) UpdatePassword(uid string, password string) error
UpdatePassword update user password Return any error if raised
func (*PasswordProvider) VerifyPassword ¶
func (p *PasswordProvider) VerifyPassword(uid string, password string) (bool, error)
Click to show internal directories.
Click to hide internal directories.