Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add some docs on how to use it, node-oauth needs an installable versi…

…on. must bug ciaranj.
  • Loading branch information...
commit 7327b6200ccf764b17dde6677524420178bb5367 1 parent bc9c208
Corey Donohoe atmos authored
Showing with 49 additions and 12 deletions.
  1. +3 −4 Makefile
  2. +33 −0 README.md
  3. +7 −8 examples/app.js
  4. +6 −0 seed.yml
7 Makefile
View
@@ -1,12 +1,11 @@
-
NODE = node
all: test
-
+
test:
@$(NODE) spec/node.js all
-
+
app:
@$(NODE) examples/app.js
-.PHONY: test app
+.PHONY: test app
33 README.md
View
@@ -0,0 +1,33 @@
+express-auth
+============
+
+Useful authentication strategies based on [warden]. Available as a [kiwi] package.
+
+Testing
+=======
+
+ % make
+
+Running with kiwi
+=================
+
+ % brew install kiwi
+ % kiwi install express-auth
+ % node examples/app.js
+
+Edit /etc/hosts to include the following entry
+
+ % grep twit /etc/hosts
+ 127.0.0.1 testtwitter.com
+
+For basic auth
+
+ % open http://localhost:3000
+
+For twitter auth
+
+ % open http://localhost:3000/twitter
+
+
+[warden]: http://github.com/hassox/warden
+[kiwi]: http://github.com/visionmedia/kiwi
15 examples/app.js
View
@@ -1,14 +1,12 @@
-var kiwi= require('kiwi');
-var sys= require('sys');
+var kiwi= require('kiwi'),
+ sys= require('sys')
kiwi.require('express')
-require('express/plugins')
-kiwi.seed('oauth')
-var OAuth= require('oauth').OAuth;
+ require('express/plugins')
-//require.paths.unshift(__dirname+ "/../lib/node-oauth/lib/")
+var OAuth= kiwi.require('oauth').OAuth;
-global.merge(require('../lib/express/plugins/auth'));
+global.merge(require('../lib/express/plugins/auth'));
var getPasswordForUserFunction= function(user, callback) {
var result;
@@ -73,4 +71,5 @@ get('/', function() {
}
});
})
-run();
+
+run();
6 seed.yml
View
@@ -0,0 +1,6 @@
+---
+ name: express-auth
+ description: Authenticate your node apps to twitter easily
+ version: 0.1.0
+ dependencies:
+ - node-outh >= 0.0.4
Please sign in to comment.
Something went wrong with that request. Please try again.