/negroni-auth

negroni handlers for authentication. based from martini-contrib

Primary LanguageGoMIT LicenseMIT

negroni-auth Build Status

Negroni middleware/handler for http basic authentication forked from martini-contrib/auth.

API Reference

Usage

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()
}

Authors