Skip to content

Commit

Permalink
Merge pull request #350 from ahfarmer/master
Browse files Browse the repository at this point in the history
docs: remove references to express's old app.configure() method
  • Loading branch information
jaredhanson committed Aug 20, 2015
2 parents bed6bb1 + dfcaaac commit 0532f79
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,14 @@ with the required `passport.initialize()` middleware. If your application uses
persistent login sessions (recommended, but not required), `passport.session()`
middleware must also be used.

app.configure(function() {
app.use(express.static(__dirname + '/../../public'));
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
});
var app = express();
app.use(express.static(__dirname + '/../../public'));
app.use(express.cookieParser());
app.use(express.bodyParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);

#### Authenticate Requests

Expand Down
18 changes: 6 additions & 12 deletions lib/authenticator.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ Authenticator.prototype.framework = function(fw) {
*
* Examples:
*
* app.configure(function() {
* app.use(passport.initialize());
* });
* app.use(passport.initialize());
*
* app.configure(function() {
* app.use(passport.initialize({ userProperty: 'currentUser' }));
* });
* app.use(passport.initialize({ userProperty: 'currentUser' }));
*
* @param {Object} options
* @return {Function} middleware
Expand Down Expand Up @@ -215,12 +211,10 @@ Authenticator.prototype.authorize = function(strategy, options, callback) {
*
* Examples:
*
* app.configure(function() {
* app.use(connect.cookieParser());
* app.use(connect.session({ secret: 'keyboard cat' }));
* app.use(passport.initialize());
* app.use(passport.session());
* });
* app.use(connect.cookieParser());
* app.use(connect.session({ secret: 'keyboard cat' }));
* app.use(passport.initialize());
* app.use(passport.session());
*
* Options:
* - `pauseStream` Pause the request stream before deserializing the user
Expand Down
10 changes: 4 additions & 6 deletions lib/middleware/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
*
* Examples:
*
* app.configure(function() {
* app.use(connect.cookieParser());
* app.use(connect.session({ secret: 'keyboard cat' }));
* app.use(passport.initialize());
* app.use(passport.session());
* });
* app.use(connect.cookieParser());
* app.use(connect.session({ secret: 'keyboard cat' }));
* app.use(passport.initialize());
* app.use(passport.session());
*
* passport.serializeUser(function(user, done) {
* done(null, user.id);
Expand Down

0 comments on commit 0532f79

Please sign in to comment.