webhookd/pkg/auth/none.go
_eternal_flame 513e6d78dd feat(security): add http basic auth (fix #6) (#7)
feat(security): add http basic auth
2018-09-04 08:28:04 +02:00

26 lines
387 B
Go

package auth
import (
"net/http"
)
type noAuth struct {
}
func (c *noAuth) Usage() string {
return "No Auth. Usage: -auth none"
}
func (c *noAuth) Init(_ bool) {}
func (c *noAuth) ParseParam(_ string) error {
return nil
}
// NoAuth A Nop Auth middleware
func (c *noAuth) Middleware() func(http.Handler) http.Handler {
return func(h http.Handler) http.Handler {
return h
}
}