Skip to content

Commit

Permalink
adding Basic Auth middleware to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbellamy committed Jan 26, 2013
1 parent b5310e1 commit db1157a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.markdown
Expand Up @@ -72,6 +72,12 @@ Where:

Provides JSONP support. If a request has a 'callback' parameter, and your application responds with a Content-Type of "application/json", the JSONP middleware will wrap the response in the callback function and set the Content-Type to "application/javascript".

* Basic Auth

Usage: mango.BasicAuth(auth func(username string, password string, Request, error) bool, failure func(Env) (Status, Headers, Body))

Performs HTTP Basic Auth. The auth function returns true if the username and password are accepted. If failure is nil, a default failure page will be used.

## Example App

package main
Expand Down

0 comments on commit db1157a

Please sign in to comment.