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

22
model/oauth.go Normal file
View File

@@ -0,0 +1,22 @@
package model
type Oauth struct {
IdModel
Op string `json:"op"`
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectUrl string `json:"redirect_url"`
AutoRegister *bool `json:"auto_register"`
TimeModel
}
const (
OauthTypeGithub = "github"
OauthTypeGoogle = "google"
OauthTypeWebauth = "webauth"
)
type OauthList struct {
Oauths []*Oauth `json:"list"`
Pagination
}