ldap

package
v2.3.219 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerIsNotUnavailable = apperr.New("ldap_server_is_not_unavailable", apperr.WithTextTranslate(translator.Translate{translator.RU: "Сервер LDAP недоступен", translator.EN: "Server LDAP is unavailable"}), apperr.WithCode(code.Unavailable))
)

Functions

This section is empty.

Types

type Auth

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

func NewAuthService

func NewAuthService(cfg Config) (*Auth, error)

func (*Auth) CheckAuth

func (a *Auth) CheckAuth(username, password string) error

func (*Auth) IsEnabled

func (a *Auth) IsEnabled() bool

type AuthService

type AuthService interface {
	IsEnabled() bool
	CheckAuth(username, password string) error
}

type Config

type Config struct {
	Enabled    bool
	Addr       string
	BaseDN     string
	BaseFilter string
	LoginAttr  string
	Domain     string
}

Jump to

Keyboard shortcuts

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