MCPcopy Index your code
hub / github.com/clips/pattern / sign

Function sign

pattern/web/oauth/__init__.py:72–77  ·  view source on GitHub ↗
(url, data={}, method="GET", secret="", token="", hash=HMAC_SHA1)

Source from the content-addressed store, hash-verified

70 return base
71
72def sign(url, data={}, method="GET", secret="", token="", hash=HMAC_SHA1):
73 # HMAC-SHA1 signature algorithm: http://tools.ietf.org/html/rfc5849#section-3.4.2
74 signature = escape(utf8(secret)) + "&" + escape(utf8(token))
75 signature = hash(signature, base(url, data, method))
76 signature = base64.b64encode(signature)
77 return signature
78
79#CONSUMER_KEY = ""
80#CONSUMER_SECRET = ""

Callers

nothing calls this directly

Calls 3

utf8Function · 0.85
escapeFunction · 0.70
baseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…