Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

sr/connect-basic-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

             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)

Releases

No releases published

Packages

No packages published