From a8a092074ab40055a1fa4c65881b174d509bdef8 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 10 Mar 2016 18:50:31 -0800 Subject: [PATCH] restructure lib/oauth1 to expose ++add-auth internals --- lib/oauth1.hoon | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/oauth1.hoon b/lib/oauth1.hoon index 8d95ce98c..0d1b631f9 100644 --- a/lib/oauth1.hoon +++ b/lib/oauth1.hoon @@ -205,24 +205,24 @@ :: :: ++ add-auth - |= $: auq/quay :: extra oauth parameters + =< |= $: auq/quay :: extra oauth parameters hiz/{purl meth hed/math (unit octs)} - == - ^- hiss - ~& add-auth+(earn -.hiz) - =< %_ hiz - hed (~(add ja hed.hiz) %authorization authorization) + == + ^- hiss + ~& add-auth+(earn -.hiz) + %_ hiz + hed (~(add ja hed.hiz) %authorization (authorization auq hiz)) == |% ++ authorization - =+ [url med ~ bod]=hiz + |= {auq/quay url/purl med/meth math bod/(unit octs)} =^ quy url [r.url url(r ~)] :: query string handled separately =. auq (fass (weld auq auth-quay)) =+ ^- qen/quay-enc :: semi-encoded for sorting %+ weld (parse-pairs bod) (encode-pairs (weld auq quy)) - =+ hds=(base-string med url qen) - =+ sig=(sign hds) + =+ bay=(base-string med url qen) + =+ sig=(sign signing-key bay) =. auq ['oauth_signature'^(crip (urle sig)) auq] (crip "OAuth {(to-header auq)}") ::