diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2023-05-07 16:39:17 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-07 16:39:17 +1000 |
| commit | fb5c285c2549c344f5b24a1cae1fe724a89f11a0 (patch) | |
| tree | 8f7dde699a6d1bfffec8413a0f66d566851af9a2 /internal/configuration/schema/notifier.go | |
| parent | 90d190121d538318ca2b1358f77b890a1cbe1b9d (diff) | |
feat(authentication): suport ldap over unix socket (#5397)
This adds support for LDAP unix sockets using the ldapi scheme. In addition it improves all of the address related parsing significantly deprecating old options.
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/configuration/schema/notifier.go')
| -rw-r--r-- | internal/configuration/schema/notifier.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/configuration/schema/notifier.go b/internal/configuration/schema/notifier.go index a95b935f1..d554e6d64 100644 --- a/internal/configuration/schema/notifier.go +++ b/internal/configuration/schema/notifier.go @@ -3,6 +3,7 @@ package schema import ( "crypto/tls" "net/mail" + "net/url" "time" ) @@ -13,8 +14,7 @@ type FileSystemNotifierConfiguration struct { // SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with. type SMTPNotifierConfiguration struct { - Host string `koanf:"host"` - Port int `koanf:"port"` + Address *AddressSMTP `koanf:"address"` Timeout time.Duration `koanf:"timeout"` Username string `koanf:"username"` Password string `koanf:"password"` @@ -26,6 +26,12 @@ type SMTPNotifierConfiguration struct { DisableHTMLEmails bool `koanf:"disable_html_emails"` DisableStartTLS bool `koanf:"disable_starttls"` TLS *TLSConfig `koanf:"tls"` + + // Deprecated: use address instead. + Host string `koanf:"host"` + + // Deprecated: use address instead. + Port int `koanf:"port"` } // NotifierConfiguration represents the configuration of the notifier to use when sending notifications to users. @@ -38,6 +44,7 @@ type NotifierConfiguration struct { // DefaultSMTPNotifierConfiguration represents default configuration parameters for the SMTP notifier. var DefaultSMTPNotifierConfiguration = SMTPNotifierConfiguration{ + Address: &AddressSMTP{Address{true, false, 25, &url.URL{Scheme: AddressSchemeSMTP, Host: "localhost:25"}}}, Timeout: time.Second * 5, Subject: "[Authelia] {title}", Identifier: "localhost", |
