Negroni middleware/handler for http basic authentication forked from martini-contrib/auth.
import (
"github.com/codegangsta/negroni"
"github.com/nabeken/negroni-auth"
)
func main() {
m := negroni.New()
// authenticate every request
m.UseHandler(auth.Basic("username", "secretpassword"))
m.Run()
}