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

Function base

pattern/web/oauth/__init__.py:63–70  ·  view source on GitHub ↗
(url, data={}, method="GET")

Source from the content-addressed store, hash-verified

61 return string
62
63def base(url, data={}, method="GET"):
64 # Signature base string: http://tools.ietf.org/html/rfc5849#section-3.4.1
65 base = escape(utf8(method.upper())) + "&"
66 base += escape(utf8(url.rstrip("?"))) + "&"
67 base += escape(utf8("&".join(["%s=%s" % (
68 escape(utf8(k)),
69 escape(utf8(v))) for k, v in sorted(data.items())])))
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

Callers 1

signFunction · 0.70

Calls 3

utf8Function · 0.85
escapeFunction · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…