ldap

package
v1.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionTestWithConfig

func ConnectionTestWithConfig(ldapConfig models.LdapConf) error

ConnectionTestWithConfig - test ldap session connection, out of the scope of normal session create/close

Types

type Session

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

Session - define a LDAP session

func CreateWithConfig

func CreateWithConfig(ldapConf models.LdapConf) (*Session, error)

CreateWithConfig - create a Session with internal config

func LoadSystemLdapConfig

func LoadSystemLdapConfig() (*Session, error)

LoadSystemLdapConfig - load LDAP configure from adminserver

func (*Session) Bind

func (session *Session) Bind(dn string, password string) error

Bind with specified DN and password, used in authentication

func (*Session) Close

func (session *Session) Close()

Close - close current session

func (*Session) ConnectionTest

func (session *Session) ConnectionTest() error

ConnectionTest - test ldap session connection with system default setting

func (*Session) Open

func (session *Session) Open() error

Open - open Session

func (*Session) SearchLdap

func (session *Session) SearchLdap(filter string) (*goldap.SearchResult, error)

SearchLdap to search ldap with the provide filter

func (*Session) SearchUser

func (session *Session) SearchUser(username string) ([]models.LdapUser, error)

SearchUser - search LDAP user by name

Jump to

Keyboard shortcuts

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