Permalink
Browse files

Ooops, don't want readme

  • Loading branch information...
1 parent 707f80f commit 5c56e82949b7a68c1e5d21760310063e60844e11 @xrd committed Jul 2, 2010
Showing with 0 additions and 56 deletions.
  1. +0 −56 README
View
@@ -1,56 +0,0 @@
-= connect-rpx.js
-
-Use RPX with Connect:
-
-== Usage:
-
- // Setup whatever require paths you need...
- var Connect = require('connect');
- var MemoryStore = require('connect/lib/connect/middleware/session/memory').MemoryStore;
- var RPX = require( 'rpx' );
-
- // Setup RPX
- //
- // Your API key, look in the settings on rpxnow.com
- RPX.config( 'apiKey', 'abcefgehijk' );
- // (Specify root paths to ignore, if you need to serve them for your login page)
- RPX.config( 'ignorePaths', [ '/stylesheets', '/images', '/javascript', '/css' ] );
- // This is where RPX will redirect you to once authentication has occurred
- RPX.config( 'reentryPoint', '/rpx_login' );
- // This will remove the user auth session cookie, effectively logging you out.
- RPX.config( 'logoutPoint', '/logout' );
- // The page which you use as a login page, see the sample login.html here.
- RPX.config( 'loginPage', '/static/login.html' );
-
- // Setup your connect. RPX requires session, cookieDecoder, redirect installed before RPX.
- var minute = 60000;
- var root = __dirname + "/public";
- var Server = module.exports = Connect.createServer(
- Connect.logger(),
- Connect.bodyDecoder(),
- Connect.redirect(),
- Connect.cookieDecoder(),
- Connect.session({ store: new MemoryStore({ reapInterval: minute, maxAge: minute * 5 }) }),
- RPX.handler,
- Connect.staticProvider( root ) // this is not strictly required,
- // but might be where you store login page and CSS, etc.
- );
-
-* Then, run your app, and it should redirect to you the loginPath specified in the configuration.
-
-* Need to test locally? This will enable a random user login rather than going into RPX for authentication
-* allowing you to test while on a plane and simulate a login.
-
- // Add this after the last RPX.config line
- // DON'T FORGET TO REMOVE THIS IN PRODUCTION!!!
- RPX.config( 'fakedAuthentication', true );
-
-== TODO:
-
-* Remove dependency on restler
-* Add something to better handle errors or cancellations
-* Write test cases, I'm so embarassed to publish without them....
-
-== THANKS
-
-This code was based on the rack-rpx module

0 comments on commit 5c56e82

Please sign in to comment.