{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/body-parser/issues/153","labels_url":"https://api.github.com/repos/expressjs/body-parser/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/body-parser/issues/153/comments","events_url":"https://api.github.com/repos/expressjs/body-parser/issues/153/events","html_url":"https://github.com/expressjs/body-parser/issues/153","id":128221049,"number":153,"title":"coinbase.verifyCallback complains (verify buffer)  -  TypeError: Not a string or buffer","user":{"login":"aristidesfl","id":208149,"avatar_url":"https://avatars.githubusercontent.com/u/208149?v=3","gravatar_id":"","url":"https://api.github.com/users/aristidesfl","html_url":"https://github.com/aristidesfl","followers_url":"https://api.github.com/users/aristidesfl/followers","following_url":"https://api.github.com/users/aristidesfl/following{/other_user}","gists_url":"https://api.github.com/users/aristidesfl/gists{/gist_id}","starred_url":"https://api.github.com/users/aristidesfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristidesfl/subscriptions","organizations_url":"https://api.github.com/users/aristidesfl/orgs","repos_url":"https://api.github.com/users/aristidesfl/repos","events_url":"https://api.github.com/users/aristidesfl/events{/privacy}","received_events_url":"https://api.github.com/users/aristidesfl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/expressjs/body-parser/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"dougwilson","id":67512,"avatar_url":"https://avatars.githubusercontent.com/u/67512?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-01-22T18:57:19Z","updated_at":"2016-01-22T19:52:07Z","closed_at":"2016-01-22T19:14:08Z","body":"It seems the verifyCallback is not accepting the *buffer* provided by `verify`.\r\n\r\nThe code:\r\n```\r\napp.post('/coinbase/notifications', bodyParser.json({ verify: function(req, res, buf) {\r\n  if (!coinbaseClient.verifyCallback(buf, req.headers['X-Signature'])) {\r\n    throw new Error('Coinbase notification did not verify');\r\n  }\r\n}}));\r\n```\r\nThe error:\r\n```\r\nTypeError: Not a string or buffer\r\n  at TypeError (native)\r\n  at Verify.verify (crypto.js:307:23)\r\n  at Base.Client.verifyCallback (/Users/user/Work/express/node_modules/coinbase/lib/Client.js:250:19)\r\n  at verifyCoinbaseNotification (/Users/user/Work/express/src/app.coffee:17:18)\r\n  at /Users/user/Work/express/node_modules/body-parser/lib/read.js:100:9\r\n  at invokeCallback (/Users/user/Work/express/node_modules/body-parser/node_modules/raw-body/index.js:262:16)\r\n  at done (/Users/user/Work/express/node_modules/body-parser/node_modules/raw-body/index.js:251:7)\r\n  at IncomingMessage.onEnd (/Users/user/Work/express/node_modules/body-parser/node_modules/raw-body/index.js:308:7)\r\n  at emitNone (events.js:67:13)\r\n  at IncomingMessage.emit (events.js:166:7)\r\n  at endReadableNT (_stream_readable.js:905:12)\r\n  at nextTickCallbackWith2Args (node.js:474:9)\r\n  at process._tickCallback (node.js:388:17)\r\n```\r\n\r\nhttps://github.com/coinbase/coinbase-node/issues/51"},"comment":{"url":"https://api.github.com/repos/expressjs/body-parser/issues/comments/174026287","html_url":"https://github.com/expressjs/body-parser/issues/153#issuecomment-174026287","issue_url":"https://api.github.com/repos/expressjs/body-parser/issues/153","id":174026287,"user":{"login":"aristidesfl","id":208149,"avatar_url":"https://avatars.githubusercontent.com/u/208149?v=3","gravatar_id":"","url":"https://api.github.com/users/aristidesfl","html_url":"https://github.com/aristidesfl","followers_url":"https://api.github.com/users/aristidesfl/followers","following_url":"https://api.github.com/users/aristidesfl/following{/other_user}","gists_url":"https://api.github.com/users/aristidesfl/gists{/gist_id}","starred_url":"https://api.github.com/users/aristidesfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aristidesfl/subscriptions","organizations_url":"https://api.github.com/users/aristidesfl/orgs","repos_url":"https://api.github.com/users/aristidesfl/repos","events_url":"https://api.github.com/users/aristidesfl/events{/privacy}","received_events_url":"https://api.github.com/users/aristidesfl/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T19:52:07Z","updated_at":"2016-01-22T19:52:07Z","body":"Thanks again!"}}