Skip to content

Instantly share code, notes, and snippets.

@tristanpendergrass
Created November 25, 2014 21:38
Show Gist options
  • Save tristanpendergrass/d559a05408b7a8adb7d1 to your computer and use it in GitHub Desktop.
Save tristanpendergrass/d559a05408b7a8adb7d1 to your computer and use it in GitHub Desktop.
var http = require('http');
module.exports = function (req, res, next) {
console.log('In the authenticate middleware');
console.log('our account uuid is', req.headers.accountuuid);
console.log('our bearer token is in here', req.headers);
http.get({
host: 'dev.api.scala.com',
path: '/v1/account/' + req.headers.accountuuid,
headers: {
Accept: 'application/json, text/plain, */*',
accountuuid: req.headers.accountuuid,
authorization: req.headers.authorization
}
}, function (res) {
console.log('our res was', res);
next();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment