ldap

package
v0.0.0-...-271f870 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnauthorize is an error that happens when a user is not member of client-id group
	ErrUnauthorize = fmt.Errorf("unauthorized for this app/client")
	// ErrUserNotFound is an error that happens when requested username is not found in ldap database
	ErrUserNotFound = fmt.Errorf("user not found")
	// ErrInvalidCredentials is an error that happens when a user's password is invalid.
	ErrInvalidCredentials = fmt.Errorf("invalid credentials")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Tls        bool
	Endpoint   string
	Basedn     string
	RoleBaseDN string

	Admindn string
	Adminpw string

	Attrs []string
}

func (*Config) NewClientWithContext

func (cfg *Config) NewClientWithContext(ctx context.Context) *client

func (*Config) Validate

func (cfg *Config) Validate() error

type ConnInterface

type ConnInterface interface {
	Bind(user, password string) error
	Close()
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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