I've added app.use(restify.authorizationParser()); and I'm passing in a valid Authorization header with a username/password combi, however the req.authorization variable is not being set. I can see that basic authorization is being set if I console out req (
http://cl.ly/image/3t2Q0I2m1i15).
var app = restify.createServer({
name: config.NAME,
version: config.VERSION,
log: log
});
app.use(restify.acceptParser(app.acceptable));
app.use(restify.authorizationParser());
app.use(restify.fullResponse());
app.use(restify.queryParser({mapParams: true}));
app.use(restify.multipartBodyParser());
app.use(restify.jsonBodyParser({mapParams: false}));
app.use(restify.gzipResponse());
// authorize user
app.pre(function auth(req, res, next) {
console.log(req.authorization);
next();
});