feat: mail service
This commit is contained in:
@@ -55,6 +55,11 @@ type SendEmailCodeInput struct {
|
||||
// Email is the single client e-mail address that should receive the login
|
||||
// code challenge.
|
||||
Email string `json:"email"`
|
||||
|
||||
// PreferredLanguage stores the canonical BCP 47 language tag derived from
|
||||
// the public Accept-Language header for upstream auth-mail localization and
|
||||
// create-only user registration context.
|
||||
PreferredLanguage string `json:"-"`
|
||||
}
|
||||
|
||||
// SendEmailCodeResult describes the public REST and adapter payload returned
|
||||
@@ -204,6 +209,7 @@ func handleSendEmailCode(authService AuthServiceClient, timeout time.Duration) g
|
||||
abortInvalidRequest(c, err.Error())
|
||||
return
|
||||
}
|
||||
input.PreferredLanguage = resolvePreferredLanguage(c.Request.Header.Get("Accept-Language"))
|
||||
|
||||
callCtx, cancel := context.WithTimeout(c.Request.Context(), timeout)
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user