diff --git a/http.go b/http.go index 8b9d444..41f9705 100644 --- a/http.go +++ b/http.go @@ -82,7 +82,9 @@ func CreateServer(config *toml.Tree) *Server { // Use installs the middleware into the router. // The Middleware must be able to detect multiple calls byy itself. Deduplication is not performed. -func (s *Server) Use(m ...gin.HandlerFunc) { s.router.Use(m...) } +func (s *Server) Use(m ...gin.HandlerFunc) { + s.router.Use(m...) +} // UseAuthBackend is the funćtion that sets the Handler for the authentication func (s *Server) UseAuthBackend(a auth.AuthenticationHandler) { @@ -93,11 +95,10 @@ func (s *Server) UseAuthBackend(a auth.AuthenticationHandler) { // The Middleware must be able to detect multiple calls byy itself. Deduplication is not performed. type Site interface { Init(*gin.RouterGroup) - Middleware() []gin.HandlerFunc } // RegisterSite adds an site to the engine as its own grouo func (s *Server) RegisterSite(path string, site Site) { - site.Init(s.router.Group(path, site.Middleware()...)) + site.Init(s.router.Group(path)) return } diff --git a/modules/saml/saml.go b/modules/saml/saml.go index ca7a1f0..405ad80 100644 --- a/modules/saml/saml.go +++ b/modules/saml/saml.go @@ -123,11 +123,6 @@ func (s *SAML) Init(router *gin.RouterGroup) { router.POST("/acs", s.acsHF) } -// Middleware returns the Required Middleware -func (s *SAML) Middleware() []gin.HandlerFunc { - return []gin.HandlerFunc{} -} - func (s *SAML) metadataHF(c *gin.Context) { m := s.sp.Metadata() log.Debug().Time("Validuntil", m.ValidUntil).Msg("SP MEtadata")