add oauth loginlog & fix bugs

This commit is contained in:
ljw
2024-09-19 10:44:49 +08:00
parent ebd1feb8d1
commit a4b413dadb
48 changed files with 3477 additions and 184 deletions
+11 -1
View File
@@ -19,7 +19,7 @@ func ApiInit(g *gin.Engine) {
frg := g.Group("/api")
frg.Use(middleware.Cors())
//frg.Use(middleware.Cors())
frg.OPTIONS("/*any", nil)
i := &api.Index{}
@@ -34,6 +34,16 @@ func ApiInit(g *gin.Engine) {
frg.POST("/login", l.Login)
}
{
o := &api.Oauth{}
// [method:POST] [uri:/api/oidc/auth]
frg.POST("/oidc/auth", o.OidcAuth)
// [method:GET] [uri:/api/oidc/auth-query?code=abc&id=xxxxx&uuid=xxxxx]
frg.GET("/oidc/auth-query", o.OidcAuthQuery)
//api/oauth/callback
frg.GET("/oauth/callback", o.OauthCallback)
frg.GET("/oauth/login", o.OauthCallback)
}
{
pe := &api.Peer{}
//提交系统信息