sbstjn / connect-basic-auth

basic auth middleware for Connect

Home Page:http://github.com/sr/connect-basic-auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

             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)

About

basic auth middleware for Connect

http://github.com/sr/connect-basic-auth

License:MIT License


Languages

Language:JavaScript 100.0%