mirror of
https://github.com/teamhanko/hanko.git
synced 2025-10-27 22:27:23 +08:00
* feat: add config to disable email delivery * chore: update config schema * docs: add new config parameter * test: fix test * fix: rename email webhook event * docs: Update backend/docs/Config.md Co-authored-by: Lennart Fleischmann <67686424+lfleischmann@users.noreply.github.com> --------- Co-authored-by: Lennart Fleischmann <67686424+lfleischmann@users.noreply.github.com>
27 lines
914 B
Go
27 lines
914 B
Go
package webhook
|
|
|
|
type EmailSend struct {
|
|
Subject string `json:"subject"` // subject
|
|
BodyPlain string `json:"body_plain"` // used for string templates
|
|
Body string `json:"body,omitempty"` // used for html templates
|
|
ToEmailAddress string `json:"to_email_address"`
|
|
DeliveredByHanko bool `json:"delivered_by_hanko"`
|
|
AcceptLanguage string `json:"accept_language"` // accept_language header from http request
|
|
Type EmailType `json:"type"` // type of the email, currently only "passcode", but other could be added later
|
|
|
|
Data interface{} `json:"data"`
|
|
}
|
|
|
|
type PasscodeData struct {
|
|
ServiceName string `json:"service_name"`
|
|
OtpCode string `json:"otp_code"`
|
|
TTL int `json:"ttl"`
|
|
ValidUntil int64 `json:"valid_until"` // UnixTimestamp
|
|
}
|
|
|
|
type EmailType string
|
|
|
|
var (
|
|
EmailTypePasscode EmailType = "passcode"
|
|
)
|