diff --git a/handler/tool.go b/handler/tool.go index 7cd3ac4..c9cb011 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -58,14 +58,16 @@ func SetUpToolGroup(router *gin.Engine) { toolGroup.POST("/file_del", DelFile) //服务器、设备状态接口 toolGroup.POST("/monitor", SetDeviceStatusV2) - toolGroup.POST("/qq_callback", handleQQCallback) - toolGroup.GET("/qq_auth", GetQQAuthUrl) - toolGroup.GET("/github_auth", GetGithubAuthUrl) - toolGroup.GET("/get_auth_url", GetThirdPartyAuthUrl) - toolGroup.GET("/github_callback", handleGithubCallback) - toolGroup.GET("/gitee_callback", handleGiteeCallback) - toolGroup.GET("/third_party_callback", handleThirdPartyCallback) //统一处理第三方登录回调 + //第三方登录所有不进行,统一认证中心 + //toolGroup.POST("/qq_callback", handleQQCallback) + //toolGroup.GET("/qq_auth", GetQQAuthUrl) + //toolGroup.GET("/github_auth", GetGithubAuthUrl) + //toolGroup.GET("/get_auth_url", GetThirdPartyAuthUrl) + //toolGroup.GET("/github_callback", handleGithubCallback) + //toolGroup.GET("/gitee_callback", handleGiteeCallback) + //toolGroup.GET("/third_party_callback", handleThirdPartyCallback) //统一处理第三方登录回调 toolGroup.POST("/loginRedirect", LoginRedirect) + toolGroup.POST("/statistic", GetUserStatistic) //发送邮件 toolGroup.POST("/send_mail", SendMailTool) toolGroup.POST("/dashboard", DashBoardStatistics) diff --git a/main.go b/main.go index 4e81eb9..0767bc1 100644 --- a/main.go +++ b/main.go @@ -36,8 +36,8 @@ func main() { panic("failed to connect redis:" + err.Error()) } r.Use(handler.CrosHandler()) - r.Use(JWTAuthMiddleware()) // 使用 JWT 认证中间件 - handler.SetUpUserGroup(r) // User + r.Use(JWTAuthMiddleware()) // 使用 JWT 认证中间件 + //handler.SetUpUserGroup(r) // User,不进行用户信息,后面统一走认证中心 handler.SetUpToolGroup(r) // Tool handler.SetUpFileGroup(r) // File handler.SetUpKnowledgeBaseGroup(r) // KnowledgeBase