Permalink
Browse files

Don't include query string in oauth base string resource

  • Loading branch information...
1 parent 4064389 commit 429c27309db81f01c14fca5d1f00443e0b5b3648 @richcollins richcollins committed Dec 15, 2010
Showing with 6 additions and 5 deletions.
  1. +5 −4 addons/Oauth/io/OauthRequest.io
  2. +1 −1 addons/Twitter/io/TwitterRequest.io
View
9 addons/Oauth/io/OauthRequest.io
@@ -56,7 +56,7 @@ OauthRequest := Object clone do(
debugWriteln("curl ", args join(" "))
sc setArguments(args)
- //System exit
+//System exit
output := sc runAndReturnOutput
//output := sc stdout readLines join("\n")
debugWriteln("curl exited")
@@ -101,10 +101,11 @@ OauthRequest := Object clone do(
escapedParams atPut(k, v urlEncoded)
)
*/
- escapedParams := postParams
+ escapedParams := postParams
- baseSeq := list(httpMethod, url urlEncoded, oauthParams merge(postParams) merge(queryParams) asOauthBaseEncoded urlEncoded) join("&")
- debugWriteln(baseSeq)
+ baseSeq := list(httpMethod, urlPath urlEncoded, oauthParams merge(postParams) merge(queryParams) asOauthBaseEncoded urlEncoded) join("&")
+debugWriteln(baseSeq)
+debugWriteln(signingKey)
authHeader := oauthParams clone atPut("oauth_signature", SHA1 hmac(signingKey, baseSeq) asBase64 removeLast) asOAuthHeader
debugWriteln(authHeader)
View
2 addons/Twitter/io/TwitterRequest.io
@@ -66,7 +66,7 @@ TwitterRequest := Object clone do(
req := OauthRequest clone
//req setUrl("http://" .. host .. path .. ".json" .. queryString)
- req setUrlPath("http://" .. host .. "/1" .. path .. ".json" .. queryString)
+ req setUrlPath("http://" .. host .. "/1" .. path .. ".json") setQueryParams(queryParams)
debugWriteln(req url)

0 comments on commit 429c273

Please sign in to comment.