ldap

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 2

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
	Btrs      []string
	Beamlines []string
	Expire    time.Time
	Foxdens   []string
}

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