Documentation ¶
Overview ¶
Package libhttp provides http related library functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BasicRealm = "Authorization Required"
BasicRealm is used when setting the WWW-Authenticate response header.
Functions ¶
func BasicAuthUnauthorized ¶
func BasicAuthUnauthorized(w http.ResponseWriter, err error)
BasicAuthUnauthorized denies authentication.
func HandleErrorJson ¶
func HandleErrorJson(w http.ResponseWriter, err error)
HandleErrorJson wraps error in JSON structure.
func ParseBasicAuth ¶
ParseBasicAuth parses an HTTP Basic Authentication string. "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" returns ("Aladdin", "open sesame", true).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.