Permalink
Browse files

Made loginName and passwordName (i.e., name of incoming body params) …

…configurable for password module.
  • Loading branch information...
1 parent 3f5a806 commit 7fcbc7de3bbd309bfa246c71ebff9b9f36bcb3d0 @bnoguchi committed Apr 5, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/password.js
View
@@ -2,7 +2,9 @@ var everyModule = require('./everymodule');
var password = module.exports =
everyModule.submodule('password')
- .configurable('loginView redirectPath')
+ .configurable('loginName passwordName loginView redirectPath')
+ .loginName('login')
+ .passwordName('password')
.get('loginPath')
.step('displayLogin')
.accepts('req res')
@@ -35,7 +37,7 @@ everyModule.submodule('password')
}
})
.extractLoginPassword( function (req, res) {
- return [req.body.login, req.body.password];
+ return [req.body[this.loginName()], req.body[this.passwordName()]];
})
.getSession( function (req) {
return req.session;

0 comments on commit 7fcbc7d

Please sign in to comment.