ldapx

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Url                  string `mapstructure:"url" json:"url,omitempty"`
	BaseDN               string `mapstructure:"base_dn" json:"base_dn,omitempty"`
	BindDN               string `mapstructure:"bind_dn" json:"bind_dn,omitempty"`
	BindPassword         string `mapstructure:"bind_password" json:"bind_password,omitempty"`
	UsernameAttribute    string `mapstructure:"username_attribute" json:"username_attribute,omitempty"`
	MailAttribute        string `mapstructure:"mail_attribute" json:"mail_attribute,omitempty"`
	DisplayNameAttribute string `mapstructure:"display_name_attribute" json:"display_name_attribute,omitempty"`
	TitleAttribute       string `mapstructure:"title_attribute" json:"title_attribute,omitempty"`
	WhenCreatedAttribute string `mapstructure:"when_created_attribute" json:"when_created_attribute,omitempty"`
	UserFilter           string `mapstructure:"user_filter" json:"user_filter,omitempty"`
	SyncUserFilter       string `mapstructure:"sync_user_filter" json:"sync_user_filter,omitempty"`
	SyncExcludeOu        string `mapstructure:"sync_exclude_ou" json:"sync_exclude_ou,omitempty"`
	GroupFilter          string `mapstructure:"group_filter" json:"group_filter"`
	GroupNameAttribute   string `mapstructure:"group_name_attribute" json:"group_name_attribute"`
}

type Connection

type Connection interface {
	Bind(username, password string) error
	Close()
	Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)
	SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error)
}

type ConnectionImpl

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

func NewLDAPConnectionImpl

func NewLDAPConnectionImpl(conn *ldap.Conn) *ConnectionImpl

func (*ConnectionImpl) Bind

func (lc *ConnectionImpl) Bind(username, password string) error

func (*ConnectionImpl) Close

func (lc *ConnectionImpl) Close()

func (*ConnectionImpl) Search

func (lc *ConnectionImpl) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error)

func (*ConnectionImpl) SearchWithPaging

func (lc *ConnectionImpl) SearchWithPaging(searchRequest *ldap.SearchRequest, pagingSize uint32) (*ldap.SearchResult, error)

type LdapProvider

type LdapProvider interface {
	CheckConnect() error
	VerifyUserCredentials(username string, password string) (domain.Profile, error)
	FindUserDetail(username string) (domain.Profile, error)
	SearchUserWithPaging() ([]domain.Profile, error)
}

func NewLdap

func NewLdap(conf Config) LdapProvider

Jump to

Keyboard shortcuts

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