add oauth loginlog & fix bugs

This commit is contained in:
ljw
2024-09-19 10:44:49 +08:00
parent ebd1feb8d1
commit a4b413dadb
48 changed files with 3477 additions and 184 deletions

14
http/request/api/oauth.go Normal file
View File

@@ -0,0 +1,14 @@
package api
type OidcAuthRequest struct {
DeviceInfo DeviceInfoInLogin `json:"deviceInfo" label:"设备信息"`
Id string `json:"id" label:"id"`
Op string `json:"op" label:"op"`
Uuid string `json:"uuid" label:"uuid"`
}
type OidcAuthQuery struct {
Code string `json:"code" form:"code" label:"code"`
Id string `json:"id" form:"id" label:"id"`
Uuid string `json:"uuid" form:"uuid" label:"uuid"`
}

View File

@@ -21,9 +21,21 @@ package api
bytes hwid = 14;
}
*/
type DeviceInfoInLogin struct {
Name string `json:"name" label:"name"`
Os string `json:"os" label:"os"`
Type string `json:"type" label:"type"`
}
type LoginForm struct {
Username string `json:"username" validate:"required,gte=4,lte=10" label:"用户名"`
Password string `json:"password,omitempty" validate:"gte=4,lte=20" label:"密码"`
AutoLogin bool `json:"autoLogin" label:"自动登录"`
DeviceInfo DeviceInfoInLogin `json:"deviceInfo" label:"设备信息"`
Id string `json:"id" label:"id"`
Type string `json:"type" label:"type"`
Uuid string `json:"uuid" label:"uuid"`
Username string `json:"username" validate:"required,gte=4,lte=10" label:"用户名"`
Password string `json:"password,omitempty" validate:"gte=4,lte=20" label:"密码"`
}
type UserListQuery struct {