mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Add LDAP support
This commit is contained in:
parent
634470ba30
commit
d4afb027e5
2 changed files with 98 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ type AccountConfig struct {
|
|||
Exempted []string
|
||||
exemptedNets []net.IPNet
|
||||
} `yaml:"require-sasl"`
|
||||
LDAP LDAPConfig
|
||||
LoginThrottling struct {
|
||||
Enabled bool
|
||||
Duration time.Duration
|
||||
|
|
@ -82,6 +83,28 @@ type AccountConfig struct {
|
|||
VHosts VHostConfig
|
||||
}
|
||||
|
||||
type LDAPConfig struct {
|
||||
Timeout int
|
||||
Enabled bool
|
||||
AllowSignup bool `yaml:"allow-signup"`
|
||||
BindDN string `yaml:"bind-dn"`
|
||||
BindPwd string `yaml:"bind-password"`
|
||||
SearchFilter string `yaml:"search-filter"`
|
||||
SearchBaseDNs []string `yaml:"search-base-dns"`
|
||||
Attributes map[string]string
|
||||
Servers LDAPServerConfig
|
||||
}
|
||||
|
||||
type LDAPServerConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
UseSSL bool `yaml:"use-ssl"`
|
||||
StartTLS bool `yaml:"start-tls"`
|
||||
SkipTLSVerify bool `yaml:"skip-tls-verify"`
|
||||
ClientCert string `yaml:"client-cert"`
|
||||
ClientKey string `yaml:"client-key"`
|
||||
}
|
||||
|
||||
// AccountRegistrationConfig controls account registration.
|
||||
type AccountRegistrationConfig struct {
|
||||
Enabled bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue