From 16d66b8c77eb71fb467a8546a788dec4280c896f Mon Sep 17 00:00:00 2001
From: John Benediktsson <mrjbq7@gmail.com>
Date: Tue, 11 Mar 2014 20:47:08 -0700
Subject: [PATCH] Revert "oauth: Generate the oauth signature base string the
 way twitter does it."

This reverts commit e633caac716d58e7f94bf29b171e096df1c7b395.
---
 extra/oauth/oauth.factor | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/extra/oauth/oauth.factor b/extra/oauth/oauth.factor
index 07fd29e752..b0a358dcf0 100644
--- a/extra/oauth/oauth.factor
+++ b/extra/oauth/oauth.factor
@@ -3,7 +3,7 @@
 USING: accessors assocs base64 calendar checksums.hmac
 checksums.sha combinators fry http http.client kernel locals
 make math namespaces present random sequences sorting strings
-urls urls.encoding urls.private checksums ;
+urls urls.encoding ;
 IN: oauth
 
 SYMBOL: consumer-token
@@ -26,20 +26,13 @@ nonce ;
     new
         consumer-token get >>consumer-token
         now timestamp>unix-time >integer >>timestamp
-        16 random-bytes hex-string >>nonce ; inline
-
-: present-base-url ( url -- string )
-    [
-        [ unparse-protocol ]
-        [ path>> url-encode % ] bi
-    ] "" make ;
+        random-32 >>nonce ; inline
 
 :: signature-base-string ( url request-method params -- string )
     [
         request-method % "&" %
-        url present-base-url url-encode-full % "&" %
+        url present url-encode-full % "&" %
         params assoc>query url-encode-full %
-        url query>> [ assoc>query "&" prepend url-encode-full % ] when*
     ] "" make ;
 
 : hmac-key ( consumer-secret token-secret -- key )