Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnforcerHandler ¶ added in v0.0.3
type EnforcerHandler struct {
// contains filtered or unexported fields
}
func NewEnforcer ¶ added in v0.0.3
func NewEnforcer(cfg *config.Config, logger log.Logger, query string, proxy proxy.RequestProxy) *EnforcerHandler
NewEnforcer returns a Enforcer handler
func (*EnforcerHandler) BasicAuth ¶ added in v0.0.3
func (h *EnforcerHandler) BasicAuth(w http.ResponseWriter, req *http.Request) (*config.VirtualHost, error)
BasicAuth enforces our autentication and returns the correct config
func (*EnforcerHandler) Error ¶ added in v0.0.3
func (h *EnforcerHandler) Error(w http.ResponseWriter, code int, err error, msg string)
Error formats and logs our http errors
func (*EnforcerHandler) ServeHTTP ¶ added in v0.0.3
func (h *EnforcerHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements our required http.Handler interface
Click to show internal directories.
Click to hide internal directories.