2022-11-21 07:20:04 +00:00
|
|
|
package dto
|
|
|
|
|
|
|
|
type CaptchaResponse struct {
|
|
|
|
CaptchaID string `json:"captchaID"`
|
|
|
|
ImagePath string `json:"imagePath"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserLoginInfo struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Token string `json:"token"`
|
|
|
|
MfaStatus string `json:"mfaStatus"`
|
|
|
|
}
|
|
|
|
|
2023-09-28 07:46:18 +00:00
|
|
|
type MfaRequest struct {
|
2023-10-27 06:19:26 +00:00
|
|
|
Title string `json:"title" validate:"required"`
|
|
|
|
Interval int `json:"interval" validate:"required"`
|
2023-09-28 07:46:18 +00:00
|
|
|
}
|
|
|
|
|
2022-11-21 07:20:04 +00:00
|
|
|
type MfaCredential struct {
|
2023-10-27 06:19:26 +00:00
|
|
|
Secret string `json:"secret" validate:"required"`
|
|
|
|
Code string `json:"code" validate:"required"`
|
|
|
|
Interval string `json:"interval" validate:"required"`
|
2022-11-21 07:20:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Login struct {
|
2023-10-27 06:19:26 +00:00
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
2023-04-30 15:58:24 +00:00
|
|
|
IgnoreCaptcha bool `json:"ignoreCaptcha"`
|
|
|
|
Captcha string `json:"captcha"`
|
|
|
|
CaptchaID string `json:"captchaID"`
|
2023-11-01 05:48:06 +00:00
|
|
|
AuthMethod string `json:"authMethod" validate:"required,oneof=jwt session"`
|
|
|
|
Language string `json:"language" validate:"required,oneof=zh en tw"`
|
2022-11-21 07:20:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type MFALogin struct {
|
2023-10-27 06:19:26 +00:00
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
Code string `json:"code" validate:"required"`
|
2022-11-21 07:20:04 +00:00
|
|
|
AuthMethod string `json:"authMethod"`
|
|
|
|
}
|