1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00
1Panel/backend/app/dto/auth.go

41 lines
1.2 KiB
Go
Raw Normal View History

2022-11-21 15:20:04 +08: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"`
}
type MfaRequest struct {
2023-10-27 14:19:26 +08:00
Title string `json:"title" validate:"required"`
Interval int `json:"interval" validate:"required"`
}
2022-11-21 15:20:04 +08:00
type MfaCredential struct {
2023-10-27 14:19:26 +08:00
Secret string `json:"secret" validate:"required"`
Code string `json:"code" validate:"required"`
Interval string `json:"interval" validate:"required"`
2022-11-21 15:20:04 +08:00
}
type Login struct {
2023-10-27 14:19:26 +08:00
Name string `json:"name" validate:"required"`
Password string `json:"password" validate:"required"`
IgnoreCaptcha bool `json:"ignoreCaptcha"`
Captcha string `json:"captcha"`
CaptchaID string `json:"captchaID"`
2023-11-01 13:48:06 +08:00
AuthMethod string `json:"authMethod" validate:"required,oneof=jwt session"`
2025-01-05 23:57:34 -03:00
Language string `json:"language" validate:"required,oneof=zh en tw jp ru ms pt-BR"`
2022-11-21 15:20:04 +08:00
}
type MFALogin struct {
2023-10-27 14:19:26 +08:00
Name string `json:"name" validate:"required"`
Password string `json:"password" validate:"required"`
Code string `json:"code" validate:"required"`
2022-11-21 15:20:04 +08:00
AuthMethod string `json:"authMethod"`
}