MCPcopy
hub / github.com/request/request / getSignature

Function getSignature

tests/test-oauth.js:11–19  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

9var http = require('http')
10
11function 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

Callers 1

test-oauth.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…