Documentation
¶
Overview ¶
Package basicauth implements HTTP basic authentication scheme.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StaticHandler ¶
type StaticHandler struct { // Handler is the handler protected by HTTP basic authentication. Handler http.Handler // UserHash is username hash to compare against. UserHash []byte // PassHash is password hash to compare against. PassHash []byte }
func Static ¶
func Static(handler http.Handler, user, pass string) *StaticHandler
Static returns a handler that serves requests from underlying handler after successful HTTP basic authentication with static credentials.
func (*StaticHandler) ServeHTTP ¶
func (h *StaticHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.