Do not mix token and auth header extraction

This commit is contained in:
Johannes Zellner
2013-09-28 17:13:17 -07:00
parent 6a8743fd0e
commit 7c14e195eb
-6
View File
@@ -153,12 +153,6 @@ function authenticate(req, res, next) {
email: result.email
};
// attach the password in case it was sent via auth headers
var auth = extractCredentialsFromHeaders(req);
if (auth && auth.username === result.username) {
req.user.password = auth.password;
}
next();
});
}