authenticator

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.0.9

type Config struct {
	DialURLs               []string `json:"dial_urls"`
	BaseDN                 string   `json:"base_dn"`
	Username               string   `json:"bind_dn"`
	Password               string   `json:"password"`
	StartTLS               int      `json:"start_tls"`
	SkipTLSVerify          bool     `json:"skip_tls_verify"`
	CACertificates         []string `json:"ca_certificates"`
	SearchQuery            string   `json:"search_query"`
	GroupAttributes        []string `json:"group_attributes"`
	PrimaryGroupPrefix     string   `json:"primary_group_prefix"`
	SecondaryGroupPrefix   string   `json:"secondary_group_prefix"`
	MembershipGroupPrefix  string   `json:"membership_group_prefix"`
	RequireGroups          bool     `json:"require_groups"`
	SFTPGoUserRequirements int      `json:"sftpgo_user_requirements"`
	BaseDir                string   `json:"base_dir"`
	CacheTime              int      `json:"cache_time"`
}

type LDAPAuthenticator

type LDAPAuthenticator struct {
	DialURLs               []string
	BaseDN                 string
	Username               string
	Password               string
	StartTLS               int
	SearchQuery            string
	GroupAttributes        []string
	PrimaryGroupPrefix     string
	SecondaryGroupPrefix   string
	MembershipGroupPrefix  string
	RequireGroups          bool
	SFTPGoUserRequirements int
	BaseDir                string
	// contains filtered or unexported fields
}

func NewAuthenticator

func NewAuthenticator(config *Config) (*LDAPAuthenticator, error)

func (*LDAPAuthenticator) CheckUserAndKeyboardInteractive

func (a *LDAPAuthenticator) CheckUserAndKeyboardInteractive(username, _, _ string, userAsJSON []byte) ([]byte, error)

func (*LDAPAuthenticator) CheckUserAndPass

func (a *LDAPAuthenticator) CheckUserAndPass(username, password, _, _ string, userAsJSON []byte) ([]byte, error)

func (*LDAPAuthenticator) CheckUserAndPublicKey

func (a *LDAPAuthenticator) CheckUserAndPublicKey(_, _, _, _ string, _ []byte) ([]byte, error)

func (*LDAPAuthenticator) CheckUserAndTLSCert

func (a *LDAPAuthenticator) CheckUserAndTLSCert(_, _, _, _ string, _ []byte) ([]byte, error)

func (*LDAPAuthenticator) Cleanup added in v1.0.7

func (a *LDAPAuthenticator) Cleanup()

func (*LDAPAuthenticator) SendKeyboardAuthRequest

func (a *LDAPAuthenticator) SendKeyboardAuthRequest(requestID, username, _, _ string, answers, _ []string,
	step int32,
) (string, []string, []bool, int, int, error)

type MultiAuthenticator added in v1.0.9

type MultiAuthenticator struct {
	Authenticators []*LDAPAuthenticator
	// contains filtered or unexported fields
}

func NewMultiAuthenticator added in v1.0.9

func NewMultiAuthenticator(configFile string) (*MultiAuthenticator, error)

func (*MultiAuthenticator) CheckUserAndKeyboardInteractive added in v1.0.9

func (m *MultiAuthenticator) CheckUserAndKeyboardInteractive(username, ip, protocol string, userAsJSON []byte) ([]byte, error)

func (*MultiAuthenticator) CheckUserAndPass added in v1.0.9

func (m *MultiAuthenticator) CheckUserAndPass(username, password, ip, protocol string, userAsJSON []byte) ([]byte, error)

func (*MultiAuthenticator) CheckUserAndPublicKey added in v1.0.9

func (m *MultiAuthenticator) CheckUserAndPublicKey(username, pubKey, ip, protocol string, userAsJSON []byte) ([]byte, error)

func (*MultiAuthenticator) CheckUserAndTLSCert added in v1.0.9

func (m *MultiAuthenticator) CheckUserAndTLSCert(username, tlsCert, ip, protocol string, userAsJSON []byte) ([]byte, error)

func (*MultiAuthenticator) SendKeyboardAuthRequest added in v1.0.9

func (m *MultiAuthenticator) SendKeyboardAuthRequest(requestID, username, password, ip string, answers,
	questions []string, step int32,
) (string, []string, []bool, int, int, error)

Jump to

Keyboard shortcuts

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