ldap

package
v1.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 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) SearchGroupByDN added in v1.5.0

func (session *Session) SearchGroupByDN(groupDN string) ([]models.LdapGroup, error)

SearchGroupByDN ...

func (*Session) SearchGroupByName added in v1.5.0

func (session *Session) SearchGroupByName(groupName string) ([]models.LdapGroup, error)

SearchGroupByName ...

func (*Session) SearchLdap

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

SearchLdap to search ldap with the provide filter

func (*Session) SearchLdapAttribute added in v1.5.0

func (session *Session) SearchLdapAttribute(baseDN, filter string, attributes []string) (*goldap.SearchResult, error)

SearchLdapAttribute - to search ldap with the provide filter, with specified attributes

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