feat: 绑定 oauth2

This commit is contained in:
naiba
2024-12-28 23:50:59 +08:00
parent 8554f3eba7
commit 18020939da
15 changed files with 360 additions and 24 deletions

View File

@@ -4,6 +4,15 @@ const (
ApiErrorUnauthorized = 10001
)
type Oauth2LoginResponse struct {
Redirect string `json:"redirect,omitempty"`
}
type Oauth2Callback struct {
State string `json:"state,omitempty"`
Code string `json:"code,omitempty"`
}
type LoginRequest struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`