v4.2.0-alpha.0+incompa... Latest Latest

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 9 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type LDAPInterface

type LDAPInterface struct {
	// contains filtered or unexported fields

LDAPInterface extracts the member list of an LDAP group entry from an LDAP server with first-class LDAP entries for groups. The LDAPInterface is *NOT* thread-safe.

func NewLDAPInterface

func NewLDAPInterface(clientConfig ldapclient.Config,
	groupQuery ldapquery.LDAPQueryOnAttribute,
	groupNameAttributes []string,
	groupMembershipAttributes []string,
	userQuery ldapquery.LDAPQueryOnAttribute,
	userNameAttributes []string,
	errorHandler syncerror.Handler) *LDAPInterface

NewLDAPInterface builds a new LDAPInterface using a schema-appropriate config

func (*LDAPInterface) Exists

func (e *LDAPInterface) Exists(ldapGroupUID string) (bool, error)

Exists determines if a group idenified with its LDAP group UID exists on the LDAP server

func (*LDAPInterface) ExtractMembers

func (e *LDAPInterface) ExtractMembers(ldapGroupUID string) ([]*ldap.Entry, error)

ExtractMembers returns the LDAP member entries for a group specified with a ldapGroupUID

func (*LDAPInterface) GroupEntryFor

func (e *LDAPInterface) GroupEntryFor(ldapGroupUID string) (*ldap.Entry, error)

GroupEntryFor returns an LDAP group entry for the given group UID by searching the internal cache of the LDAPInterface first, then sending an LDAP query if the cache did not contain the entry. This also satisfies the LDAPGroupGetter interface

func (*LDAPInterface) ListGroups

func (e *LDAPInterface) ListGroups() ([]string, error)

ListGroups queries for all groups as configured with the common group filter and returns their LDAP group UIDs. This also satisfies the LDAPGroupLister interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL