Permalink
Browse files

Added HTTP Authentication and basic inlinde edit function

  • Loading branch information...
semu
semu committed Sep 26, 2011
1 parent 50801bc commit 503694f486425b485eb570a09341b1953617abc4
View
5 app.js
@@ -2,5 +2,6 @@ var mongoclikker = require('./mongoclikker.js');
mongoclikker/*.setHost('localhost')
.andPort(27017)
- .forDatabase('mongoclikker')
- */.andListenOn(2002);
+ .forDatabase('mongoclikker') */
+ .protectWith('mongo', 'clikker') /* Set password for HTTP Access Authorization! Not MongoDB password! */
+ .andListenOn(2002);
@@ -0,0 +1,20 @@
+Copyright (c) 2010 by Simon Rozet <http://atonie.org>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,26 @@
+ 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)
Oops, something went wrong.

0 comments on commit 503694f

Please sign in to comment.