✨ github oauth2 login /gitee oauth2 login
This commit is contained in:
@@ -9,8 +9,22 @@ 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)
|
||||
{
|
||||
group.GET("/generate_client_id", oauth.GenerateClientId)
|
||||
group.GET("/get_temp_qrcode", oauth.GetTempQrCode)
|
||||
//group.GET("/callback", oauth.CallbackVerify)
|
||||
group.POST("/callback", oauth.CallbackNotify)
|
||||
|
||||
githubRouter := group.Group("/github")
|
||||
{
|
||||
githubRouter.GET("/get_url", oauth.GetRedirectUrl)
|
||||
githubRouter.GET("/callback", oauth.Callback)
|
||||
}
|
||||
giteeRouter := group.Group("/gitee")
|
||||
{
|
||||
giteeRouter.GET("/get_url", oauth.GetGiteeRedirectUrl)
|
||||
giteeRouter.GET("/callback", oauth.GiteeCallback)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -12,6 +12,7 @@ func WebsocketRouter(router *gin.RouterGroup) {
|
||||
{
|
||||
group.GET("/socket", websocketAPI.NewSocketClient)
|
||||
group.GET("/delete", websocketAPI.DeleteClient)
|
||||
group.GET("/gws", websocketAPI.NewGWSServer)
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user