init push
This commit is contained in:
21
internal/app/api/routes_saml_auth.go
Normal file
21
internal/app/api/routes_saml_auth.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package api
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
|
||||
func registerSAMLAuthRoutes(v1 fiber.Router, samlHandler interface {
|
||||
HandleLogin(*fiber.Ctx) error
|
||||
HandleSAMLCallback(*fiber.Ctx) error
|
||||
HandleSLO(*fiber.Ctx) error
|
||||
HandleMetadata(*fiber.Ctx) error
|
||||
HandleLogout(*fiber.Ctx) error
|
||||
}) {
|
||||
if samlHandler == nil {
|
||||
return
|
||||
}
|
||||
auth := v1.Group("/auth")
|
||||
auth.Get("/login", samlHandler.HandleLogin)
|
||||
auth.Post("/saml/callback", samlHandler.HandleSAMLCallback)
|
||||
auth.Post("/saml/logout", samlHandler.HandleSLO)
|
||||
auth.Get("/saml/metadata", samlHandler.HandleMetadata)
|
||||
auth.Post("/saml/app-logout", samlHandler.HandleLogout)
|
||||
}
|
||||
Reference in New Issue
Block a user