add qq oauth2 login

This commit is contained in:
landaiqing
2024-08-19 23:10:15 +08:00
parent 08b2790bee
commit 1094957ea4
16 changed files with 884 additions and 78 deletions

View File

@@ -10,11 +10,13 @@ var oauth = api.Api.OAuthApi
func OauthRouter(router *gin.RouterGroup) {
group := router.Group("/oauth")
{
group.GET("/generate_client_id", oauth.GenerateClientId)
group.GET("/get_temp_qrcode", oauth.GetTempQrCode)
//group.GET("/callback", oauth.CallbackVerify)
group.POST("/callback", oauth.CallbackNotify)
wechatRouter := group.Group("/wechat")
{
wechatRouter.GET("/generate_client_id", oauth.GenerateClientId)
wechatRouter.GET("/get_temp_qrcode", oauth.GetTempQrCode)
//wechatRouter.GET("/callback", oauth.CallbackVerify)
wechatRouter.POST("/callback", oauth.CallbackNotify)
}
githubRouter := group.Group("/github")
{
githubRouter.GET("/get_url", oauth.GetRedirectUrl)
@@ -25,6 +27,11 @@ func OauthRouter(router *gin.RouterGroup) {
giteeRouter.GET("/get_url", oauth.GetGiteeRedirectUrl)
giteeRouter.GET("/callback", oauth.GiteeCallback)
}
qqRouter := group.Group("/qq")
{
qqRouter.GET("/get_url", oauth.GetQQRedirectUrl)
qqRouter.GET("/callback", oauth.QQCallback)
}
}
}