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)
}
