Skip to content
This repository
Browse code

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

…configurable for password module.
  • Loading branch information...
commit 7fcbc7de3bbd309bfa246c71ebff9b9f36bcb3d0 1 parent 3f5a806
Brian Noguchi authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 lib/password.js
6 lib/password.js
@@ -2,7 +2,9 @@ var everyModule = require('./everymodule');
2 2
3 3 var password = module.exports =
4 4 everyModule.submodule('password')
5   - .configurable('loginView redirectPath')
  5 + .configurable('loginName passwordName loginView redirectPath')
  6 + .loginName('login')
  7 + .passwordName('password')
6 8 .get('loginPath')
7 9 .step('displayLogin')
8 10 .accepts('req res')
@@ -35,7 +37,7 @@ everyModule.submodule('password')
35 37 }
36 38 })
37 39 .extractLoginPassword( function (req, res) {
38   - return [req.body.login, req.body.password];
  40 + return [req.body[this.loginName()], req.body[this.passwordName()]];
39 41 })
40 42 .getSession( function (req) {
41 43 return req.session;

0 comments on commit 7fcbc7d

Please sign in to comment.
Something went wrong with that request. Please try again.