libhttp

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2015 License: MIT Imports: 5 Imported by: 2

Documentation

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(res http.ResponseWriter, err error)

BasicAuthUnauthorized denies authentication.

func HandleErrorJson

func HandleErrorJson(w http.ResponseWriter, err error)

HandleErrorJson wraps error in JSON structure.

func ParseBasicAuth

func ParseBasicAuth(auth string) (username, password string, ok bool)

ParseBasicAuth parses an HTTP Basic Authentication string. "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" returns ("Aladdin", "open sesame", true).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL