ldap

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ldap

type Ldap struct {
	*LdapConfig
	// contains filtered or unexported fields
}

func NewLdap

func NewLdap(conf *LdapConfig, certificates []tls.Certificate) (*Ldap, error)

func (*Ldap) GetUser

func (p *Ldap) GetUser(username string, attributes ...string) (map[string]string, error)

func (*Ldap) GetUserRaw

func (p *Ldap) GetUserRaw(username string, attributes ...string) (map[string][][]byte, error)

func (*Ldap) Login

func (p *Ldap) Login(username, password string, attributes ...string) (map[string]string, error)

type LdapConfig

type LdapConfig struct {
	Addr               string `json:"addr"`
	BaseDN             string `json:"baseDn"`
	BindDN             string `json:"bindDn"`
	BindPwd            string `json:"bindPwd"`
	Filter             string `json:"filter"`
	SSL                bool   `json:"ssl"`
	TLS                bool   `json:"tls"`
	InsecureSkipVerify bool   `json:"insecureSkipVerify"`
}

func (LdapConfig) String

func (p LdapConfig) String() string

func (*LdapConfig) Validate

func (p *LdapConfig) Validate() error

Jump to

Keyboard shortcuts

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