ldap

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserNotFoundError       = fmt.Errorf("user was not found")
	MultipleUsersFoundError = fmt.Errorf("multiple users was found")
)

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Connect() (Session, error)
}

type Session

type Session interface {
	io.Closer

	LoginTest(username, password string) error
	GetUserAttributes(username string, attributes []string) (map[string][]string, error)
}

type SimpleConnector

type SimpleConnector struct {
	Config *config.LDAPConfig
}

func (SimpleConnector) Connect

func (c SimpleConnector) Connect() (Session, error)

type SimpleSession

type SimpleSession struct {
	IDAttribute string
	BaseDN      string
	// contains filtered or unexported fields
}

func (*SimpleSession) Close

func (c *SimpleSession) Close() error

func (*SimpleSession) GetUserAttributes

func (c *SimpleSession) GetUserAttributes(username string, attributes []string) (map[string][]string, error)

func (*SimpleSession) LoginTest

func (c *SimpleSession) LoginTest(username, password string) error

Jump to

Keyboard shortcuts

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