Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

basic auth middleware for Connect

branch: master

fix it

latest commit 769342bc36
Simon Rozet authored July 03, 2010
Octocat-spinner-32 bin regorganize things June 30, 2010
Octocat-spinner-32 lib fix it July 03, 2010
Octocat-spinner-32 test fix it July 03, 2010
Octocat-spinner-32 COPYING README and COPYING June 30, 2010
Octocat-spinner-32 README README and COPYING June 30, 2010
README
             connect-basic-auth ~ basic auth middleware for Connect

USAGE

    var connect   = require("connect"),
        basicAuth = require("basicAuth");

    connect.createServer(
      basicAuth(function (user, password) {
        return user === "admin" && password == "secret";
      }),

      function (req, res) {
        res.writeHead(200);
        res.end("welcome " + req.headers.remote_user);
      }
    );

TEST

    ./bin/expresso -I lib

COPYING

    Copyright (c) 2010 by Simon Rozet <http://atonie.org>
    See the COPYING file for the license (it's MIT)
Something went wrong with that request. Please try again.