sipd-auth/model/form/auth_form.go
2025-09-16 08:32:11 +07:00

21 lines
1.3 KiB
Go

package form
type PreLoginForm struct {
Username string `json:"username" form:"username" xml:"username" validate:"required" example:"198604292011011004"` // Username of user (NIP)
Password string `json:"password" form:"password" xml:"password" validate:"required" example:"1"` // User password
Tahun int `json:"tahun" form:"tahun" xml:"tahun" validate:"gte=1" example:"2023"`
CaptchaId string `json:"captcha_id" validate:"required"`
CaptchaSolution string `json:"captcha_solution" validate:"required"`
}
type LoginForm struct {
Password string `json:"password" form:"password" xml:"password" validate:"required" example:"1"` // User password
IdDaerah int64 `json:"id_daerah" form:"id_daerah" xml:"id_daerah" example:"34"` // Id daerah user
IdPegawai int64 `json:"id_pegawai" form:"id_pegawai" xml:"id_pegawai" example:"36107"`
}
type RefreshTokenForm struct {
//JWT expired token
Token string `json:"token" xml:"token" example:"xxxxx" validate:"required"`
}