(r)
| 9 | var http = require('http') |
| 10 | |
| 11 | function getSignature (r) { |
| 12 | var sign |
| 13 | r.headers.Authorization.slice('OAuth '.length).replace(/, /g, ',').split(',').forEach(function (v) { |
| 14 | if (v.slice(0, 'oauth_signature="'.length) === 'oauth_signature="') { |
| 15 | sign = v.slice('oauth_signature="'.length, -1) |
| 16 | } |
| 17 | }) |
| 18 | return decodeURIComponent(sign) |
| 19 | } |
| 20 | |
| 21 | // Tests from Twitter documentation https://dev.twitter.com/docs/auth/oauth |
| 22 |
no outgoing calls
no test coverage detected
searching dependent graphs…