ldap

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Search(ldapURL, login, password, baseDN, user string, attributes []string) (*ldap.SearchResult, error)

Search provides LDAP search for our FOXDEN LDAP service

Types

type Cache

type Cache struct {
	Map map[string]Entry
}

Cache represent LDAP cache

func (*Cache) Search

func (c *Cache) Search(login, password, user string) (Entry, error)

Search provides cached search results

type Entry

type Entry struct {
	DN     string
	Groups []string
	Expire time.Time
}

Entry represents LDAP user entry

func (*Entry) Belong

func (e *Entry) Belong(group string) bool

Belong checks if group belongs with LDAP entry

Jump to

Keyboard shortcuts

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