Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LdapConfig ¶
type LdapConfig struct { Conn *ldap.Conn Host string `validate:"required,ipv4|ipv6|hostname|fqdn"` Port int `validate:"required,number,min=1,max=65535"` BindUser string `validate:"required,printascii,excludesall=!?*%&/\()[]{}$#<>.,"` BindPassword string `validate:"required,printascii,max=50"` BaseDN string `validate:"required,printascii,excludesall=!?*%&/\()[]{}$#<>.,"` ServerName string `validate:"required,ipv4|ipv6|hostname|fqdn"` Attributes string `validate:"required,printascii,excludesall=!?*%&/\()[]{}$#<>."` }
LdapConfig will hold the config which are needed to connect and search
func (*LdapConfig) Authenticate ¶
func (lc *LdapConfig) Authenticate(username, password string) (map[string]string, error)
Authenticate will bind, search for a user and authenticate
func (*LdapConfig) CheckGroupMembership ¶
func (lc *LdapConfig) CheckGroupMembership(username, group string) (bool, error)
CheckGroupMembership will check if a given user is member of a given group
Click to show internal directories.
Click to hide internal directories.