removed useless Method Middleware from the site
Dieser Commit ist enthalten in:
Ursprung
f7b6593205
Commit
9dd2e49954
7
http.go
7
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
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
|
Laden…
In neuem Issue referenzieren