ldap

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(ctx context.Context, signupDisabled bool, cfg Config) (sdk.AuthDriver, error)

NewDriver returns a new ldap auth driver.

Types

type AuthDriver

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

func (AuthDriver) CheckSigninRequest

func (d AuthDriver) CheckSigninRequest(req sdk.AuthConsumerSigninRequest) error

func (AuthDriver) GetManifest

func (d AuthDriver) GetManifest() sdk.AuthDriverManifest

func (AuthDriver) GetSessionDuration

func (d AuthDriver) GetSessionDuration() time.Duration

func (AuthDriver) GetUserInfo

type Config

type Config struct {
	Host            string // 192.168.1.32
	Port            int    // 636
	SSL             bool   // true
	RootDN          string // dc=ejnserver,dc=fr
	UserSearchBase  string // ou=people
	UserSearch      string // uid={{.search}}
	UserFullname    string // {{.givenName}} {{.sn}}
	ManagerDN       string // cn=admin,dc=ejnserver,dc=fr
	ManagerPassword string // SECRET_PASSWORD_MANAGER
}

Config handles all config to connect to the LDAP.

type Entry

type Entry struct {
	DN         string
	Attributes map[string]string
}

Entry represents a LDAP entity

Jump to

Keyboard shortcuts

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