Documentation ¶
Index ¶
- type Client
- func (lc *Client) DeleteGroup(name string) error
- func (lc *Client) DeleteUser(id string) error
- func (lc *Client) GetGroup(name string) (spi.Group, error)
- func (lc *Client) GetRootGroup() (spi.Group, error)
- func (lc *Client) GetUser(username string, attrNames []string) (spi.User, error)
- func (lc *Client) GetUserInfo(id string) (spi.UserInfo, error)
- func (lc *Client) InsertGroup(name string, parentID string) error
- func (lc *Client) InsertUser(user spi.UserInfo) error
- func (lc *Client) UpdateUser(user spi.UserInfo) error
- type Config
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Host string Port int UseSSL bool AdminDN string AdminPassword string Base string UserFilter string // e.g. "(uid=%s)" GroupFilter string // e.g. "(memberUid=%s)" AdminConn *ldap.Conn }
Client is an LDAP client
func (*Client) DeleteGroup ¶
DeleteGroup deletes an affiliation group
func (*Client) GetRootGroup ¶
GetRootGroup returns the root affiliation group
func (*Client) GetUser ¶
GetUser returns a user object for username and attribute values for the requested attribute names
func (*Client) GetUserInfo ¶
GetUserInfo gets user information from database
func (*Client) InsertGroup ¶
InsertGroup adds an affiliation group
func (*Client) InsertUser ¶
InsertUser inserts a user
type Config ¶
type Config struct { // URL is of the form: ldap://adminDN:adminPassword@host:port/base URL string `json:"url"` Base string `json:"base,omitempty"` UserFilter string `json:"userfilter,omitempty"` GroupFilter string `json:"groupfilter,omitempty"` }
Config is the configuration object for this LDAP client
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents a single user
func (*User) GetAffiliationPath ¶
GetAffiliationPath returns the affiliation path for this user
func (*User) GetAttribute ¶
GetAttribute returns the value of an attribute, or "" if not found
Click to show internal directories.
Click to hide internal directories.