jaredhanson/passport-http-oauth — pull request #10 by tinnou (2014-10-01 07:25:21+00:00)
Title: Fix url giving wrong signature base if used with Express app.use()

If using Express 4 `app.use()` to mount certain routes paths, the `req.url` will be rewritten to reflect the mounted path. This has the effect of creating a wrong base resulting in an invalid computed signature. I changed it to use `req.originalUrl` since it preserves the original path.

e.g:
if you use

app.use('/users', users)

and in your users module you have

/* GET user by Id. */
router.get('/:id',
passport.authenticate('consumer', { session: false }),
function (req, res) {
console.log("Authenticated!");
});

The `req.url` will be set to `http://domain/12345` whereas `req.original` will be `http://domain/users/12345`