feat: support time_zone for user registration context
This commit is contained in:
@@ -79,6 +79,11 @@ type ConfirmEmailCodeInput struct {
|
||||
// ClientPublicKey is the standard base64-encoded raw 32-byte Ed25519 public
|
||||
// key that should be registered for the created device session.
|
||||
ClientPublicKey string `json:"client_public_key"`
|
||||
|
||||
// TimeZone is the client-selected IANA time zone name forwarded to the
|
||||
// Auth / Session Service as registration context for first-time user
|
||||
// creation.
|
||||
TimeZone string `json:"time_zone"`
|
||||
}
|
||||
|
||||
// ConfirmEmailCodeResult describes the public REST and adapter payload
|
||||
@@ -391,6 +396,11 @@ func validateConfirmEmailCodeInput(input *ConfirmEmailCodeInput) error {
|
||||
return errors.New("client_public_key must not be empty")
|
||||
}
|
||||
|
||||
input.TimeZone = strings.TrimSpace(input.TimeZone)
|
||||
if input.TimeZone == "" {
|
||||
return errors.New("time_zone must not be empty")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user