Documentation
¶
Index ¶
- type Config
- type LDAPAuthenticator
- func (a *LDAPAuthenticator) CheckUserAndKeyboardInteractive(username, _, _ string, userAsJSON []byte) ([]byte, error)
- func (a *LDAPAuthenticator) CheckUserAndPass(username, password, _, _ string, userAsJSON []byte) ([]byte, error)
- func (a *LDAPAuthenticator) CheckUserAndPublicKey(_, _, _, _ string, _ []byte) ([]byte, error)
- func (a *LDAPAuthenticator) CheckUserAndTLSCert(_, _, _, _ string, _ []byte) ([]byte, error)
- func (a *LDAPAuthenticator) Cleanup()
- func (a *LDAPAuthenticator) SendKeyboardAuthRequest(requestID, username, _, _ string, answers, _ []string, step int32) (string, []string, []bool, int, int, error)
- type MultiAuthenticator
- func (m *MultiAuthenticator) CheckUserAndKeyboardInteractive(username, ip, protocol string, userAsJSON []byte) ([]byte, error)
- func (m *MultiAuthenticator) CheckUserAndPass(username, password, ip, protocol string, userAsJSON []byte) ([]byte, error)
- func (m *MultiAuthenticator) CheckUserAndPublicKey(username, pubKey, ip, protocol string, userAsJSON []byte) ([]byte, error)
- func (m *MultiAuthenticator) CheckUserAndTLSCert(username, tlsCert, ip, protocol string, userAsJSON []byte) ([]byte, error)
- func (m *MultiAuthenticator) SendKeyboardAuthRequest(requestID, username, password, ip string, answers, questions []string, ...) (string, []string, []bool, int, int, error)
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()
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)
Click to show internal directories.
Click to hide internal directories.