blob: a566cd20d3472197e456c0b87a3f699ea5969635 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package provider
import (
"crypto/x509"
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/notification"
)
// NewNotificationSMTP creates a new notification.Notifier using the *notification.SMTPNotifier given a valid
// configuration.
//
// Warning: This method may panic if the provided configuration isn't validated.
func NewNotificationSMTP(config *schema.Configuration, caCertPool *x509.CertPool) notification.Notifier {
return notification.NewSMTPNotifier(config.Notifier.SMTP, caCertPool)
}
// NewNotificationFile creates a new notification.Notifier using the *notification.FileNotifier given a valid
// configuration.
//
// Warning: This method may panic if the provided configuration isn't validated.
func NewNotificationFile(config *schema.Configuration, caCertPool *x509.CertPool) notification.Notifier {
return notification.NewSMTPNotifier(config.Notifier.SMTP, caCertPool)
}
|