cart and checkout
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package customerauth
|
||||
|
||||
import "log"
|
||||
|
||||
// Notifier delivers transactional auth messages (email verification and
|
||||
// password reset). The auth server only builds the links; delivery is pluggable
|
||||
// so this is the seam where a real mailer — or the planned notification service
|
||||
// (commerce-maturity plan, section C3) — gets wired in. The default LogNotifier
|
||||
// just logs the link, which is enough for local development.
|
||||
type Notifier interface {
|
||||
SendEmailVerification(email, link string)
|
||||
SendPasswordReset(email, link string)
|
||||
}
|
||||
|
||||
// LogNotifier writes the links to the standard logger instead of sending them.
|
||||
type LogNotifier struct{}
|
||||
|
||||
func (LogNotifier) SendEmailVerification(email, link string) {
|
||||
log.Printf("customerauth: email verification for %s: %s", email, link)
|
||||
}
|
||||
|
||||
func (LogNotifier) SendPasswordReset(email, link string) {
|
||||
log.Printf("customerauth: password reset for %s: %s", email, link)
|
||||
}
|
||||
Reference in New Issue
Block a user