github oauth2 login /gitee oauth2 login

This commit is contained in:
landaiqing
2024-08-19 00:14:01 +08:00
parent 57964d39af
commit 08b2790bee
23 changed files with 783 additions and 138 deletions

21
config/conf_oauth.go Normal file
View File

@@ -0,0 +1,21 @@
package config
// OAuth is the configuration of OAuth.
type OAuth struct {
Github Github `yaml:"github"`
Gitee Gitee `yaml:"gitee"`
}
// Github and GiteeConfig are the configuration of Github and Gitee OAuth.
type Github struct {
ClientID string `yaml:"client-id"`
ClientSecret string `yaml:"client-secret"`
RedirectURI string `yaml:"redirect-uri"`
}
// Gitee is the configuration of Gitee OAuth.
type Gitee struct {
ClientID string `yaml:"client-id"`
ClientSecret string `yaml:"client-secret"`
RedirectURI string `yaml:"redirect-uri"`
}