ldap

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func (*Cache) Add

func (c *Cache) Add(key string, user *User)

func (*Cache) Get

func (c *Cache) Get(key string) *User

type Ldap

type Ldap struct {
	Conn              *ldap.Conn
	UserBase          string
	UserFilter        string
	UserKey           string
	GroupBase         string
	AppGroupBase      string
	AdminGroupBase    string
	CustomerGroupBase string
	OpsGroupBase      string
}

func NewLdap

func NewLdap() *Ldap

func (*Ldap) Search

func (l *Ldap) Search(groupDN string) (users Users, err error)

type User

type User struct {
	ID       string `ldap:"id"`
	Dn       string `ldap:"dn"`
	Username string `ldap:"displayName"`
	Mail     string `ldap:"mail"`
}

type Users

type Users []User

func (Users) Exist

func (u Users) Exist(dn string) bool

Jump to

Keyboard shortcuts

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