ldap

package
v0.0.0-...-0346acb Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = fmt.Errorf("User not found")
)

Functions

func BindAdmin

func BindAdmin(c *ldap.Conn) error

BindAdmin binds as a read-only LDAP user which is to be used for searching the LDAP directory.

func BindUser

func BindUser(c *ldap.Conn, username, password string) error

BindAdmin binds as a read-only LDAP user which is to be used for searching the LDAP directory.

func Connect

func Connect() (*ldap.Conn, error)

Connect creates a new connection for talking to ldap

func ReadUser

func ReadUser(c *ldap.Conn, uid string) (*domain.User, error)

func SearchUser

func SearchUser(c *ldap.Conn, username string) (*ldap.SearchResult, error)

SearchUser attempts to search for a given username, SearchUser also assumes that you have already run Bind with a valid user.

Types

type Conn

type Conn struct {
	*ldap.Conn
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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