mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
242386e279
- Adjust AUTH LOGIN functionality to be closer to AUTH PLAIN - Removed: secure (notifier smtp conf) boolean string - Added: disable_verify_cert (notifier smtp conf) boolean - disables X509 validation of certificates - Added: disable_require_tls (notifier smtp conf) boolean - allows emails to be sent over plain text (for non-authenticated only) - Added: trusted_cert (notifier smtp conf) string (path) - allows specifying the path of a PEM format cert to add to trusted cert pool - Make SMTP notifier return errors on connection over plain text - Make SMTP notifier return errors on TLS connection with invalid certs - Implemented various debug logging for the SMTP notifier - Implemented explicit SMTP closes on errors (previously left con open) - Split SMTPNotifier Send func to seperate funcs for: - writing future test suites and startup checks more easily - organization and readability - Add details of changes to docs/security.yml - Adjust config.yml's (template and test) for the changes
34 lines
1.3 KiB
Go
34 lines
1.3 KiB
Go
package schema
|
|
|
|
// FileSystemNotifierConfiguration represents the configuration of the notifier writing emails in a file.
|
|
type FileSystemNotifierConfiguration struct {
|
|
Filename string `yaml:"filename"`
|
|
}
|
|
|
|
// EmailNotifierConfiguration represents the configuration of the email service notifier (like GMAIL API).
|
|
type EmailNotifierConfiguration struct {
|
|
Username string `yaml:"username"`
|
|
Password string `yaml:"password"`
|
|
Sender string `yaml:"sender"`
|
|
Service string `yaml:"service"`
|
|
}
|
|
|
|
// SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with.
|
|
type SMTPNotifierConfiguration struct {
|
|
Username string `yaml:"username"`
|
|
Password string `yaml:"password"`
|
|
Sender string `yaml:"sender"`
|
|
Host string `yaml:"host"`
|
|
Port int `yaml:"port"`
|
|
TrustedCert string `yaml:"trusted_cert"`
|
|
DisableVerifyCert bool `yaml:"disable_verify_cert"`
|
|
DisableRequireTLS bool `yaml:"disable_require_tls"`
|
|
}
|
|
|
|
// NotifierConfiguration represents the configuration of the notifier to use when sending notifications to users.
|
|
type NotifierConfiguration struct {
|
|
FileSystem *FileSystemNotifierConfiguration `yaml:"filesystem"`
|
|
Email *EmailNotifierConfiguration `yaml:"email"`
|
|
SMTP *SMTPNotifierConfiguration `yaml:"smtp"`
|
|
}
|