init push
This commit is contained in:
18
internal/routes/routes.go
Normal file
18
internal/routes/routes.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user