登录与授权等

This commit is contained in:
2024-01-07 15:13:35 +08:00
parent 968eab9b06
commit ec548f4256
22 changed files with 248 additions and 53 deletions

View File

@@ -1,10 +0,0 @@
package param
type AuthorizeQueryParam struct {
ClientId uint `form:"client_id" binding:"required"`
ResponseType string `form:"response_type" binding:"required"`
State string `form:"state" binding:"required"`
Scope string `form:"scope" binding:"required"`
CodeChallenge string `form:"code_challenge" binding:"required"`
CodeChallengeMethod string `form:"code_challenge_method" binding:"required"`
}

12
pkg/param/instance.go Normal file
View File

@@ -0,0 +1,12 @@
package param
type AddInstanceParam struct {
Name string `json:"name" binding:"required"`
UpdateURL string `json:"update_url"`
}
type NewGrantTokenParam struct {
Target string `json:"target" binding:"required"`
TTL int `json:"ttl"`
ExpireAt string `json:"expire_at"`
}

View File

@@ -1,6 +1,6 @@
package param
type LoginParam struct {
Username string `json:"username"`
Password string `json:"password"`
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}