ldap

package
v0.0.0-...-1618023 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = errors.New("user not found")
	ErrMoreThanOne  = errors.New("more than one record has been found")
	ErrInvalidCert  = errors.New("invalid root ca cert")
	ErrDisabled     = errors.New("disabled in ldap authentication")
)

Functions

This section is empty.

Types

type Backend

type Backend struct {
	*Options
	// contains filtered or unexported fields
}

Backend is an authentication backend that queries an LDAP/Active Directory server for authentication

func Init

Init creates a new LDAP authentication backend

func (*Backend) CanUsersRegister

func (s *Backend) CanUsersRegister() bool

CanUsersRegister is disabled in the LDAP authentication backend

func (*Backend) Close

func (s *Backend) Close()

Close the LDAP client if it's open

func (*Backend) CreateUser

func (s *Backend) CreateUser(user storage.User) error

CreateUser is disabled in the LDAP authentication backend

func (*Backend) GenerateSecurePassword

func (s *Backend) GenerateSecurePassword(password string) (string, error)

GenerateSecurePassword is disabled in the LDAP authentication backend

func (*Backend) Login

func (s *Backend) Login(username, password string) (*storage.User, error)

Login searches the database backend for a matching user record

func (*Backend) UserCanChangePassword

func (s *Backend) UserCanChangePassword() bool

UserCanChangePassword is disabled in the LDAP authentication backend

type LDAPAuthPlugin

type LDAPAuthPlugin struct{}

type Options

type Options struct {
	Address      string `yaml:"address"`
	Base         string `yaml:"base_dn"`
	BindDN       string `yaml:"bind_dn"`
	BindPassword string `yaml:"bind_password"`
	RootCACert   string `yaml:"root_ca"`
}

Options contains all the LDAP configuration options

Jump to

Keyboard shortcuts

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