Documentation ¶
Overview ¶
Package basic implements basic auth mechanisms for orujo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicHandler ¶
type BasicHandler struct { // ErrorMsg can be used to set a custom error message. The parameter // provuser contains the username provided by the user. ErrorMsg func(w http.ResponseWriter, provuser string) // contains filtered or unexported fields }
A BasicHandler is a orujo built-in handler that provides basic authentication.
func NewBasicHandler ¶
func NewBasicHandler(realm, username, password string) BasicHandler
NewBasicHandler returns a new BasicHandler.
func (BasicHandler) ServeHTTP ¶
func (h BasicHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP validates the username and password provided by the user.
Click to show internal directories.
Click to hide internal directories.