init push

This commit is contained in:
2026-07-16 22:16:45 +07:00
commit 8b068bdb10
1021 changed files with 332816 additions and 0 deletions

18
internal/routes/routes.go Normal file
View File

@@ -0,0 +1,18 @@
package routes
import (
"github.com/gofiber/fiber/v2"
samlauth "wucher/internal/auth"
authmw "wucher/internal/middleware"
)
func Register(app *fiber.App, authHandler *samlauth.Handler, profileHandler fiber.Handler) {
app.Get("/auth/login", authHandler.HandleLogin)
app.Post("/auth/saml/callback", authHandler.HandleSAMLCallback)
app.Post("/auth/saml/logout", authHandler.HandleSLO)
app.Get("/auth/saml/metadata", authHandler.HandleMetadata)
app.Post("/auth/logout", authHandler.HandleLogout)
api := app.Group("/api", authmw.RequireAuth)
api.Get("/profile", profileHandler)
}