Created
November 4, 2011 17:12
-
-
Save basyura/1339878 to your computer and use it in GitHub Desktop.
oauth.vim - diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/autoload/oauth.vim b/autoload/oauth.vim | |
old mode 100644 | |
new mode 100755 | |
index a9ffcfe..85f8ff2 | |
--- a/autoload/oauth.vim | |
+++ b/autoload/oauth.vim | |
@@ -82,12 +82,18 @@ function! oauth#get(url, ctx, ...) | |
for key in keys(params) | |
let query[key] = params[key] | |
endfor | |
+ for key in keys(getdata) | |
+ let query[key] = getdata[key] | |
+ endfor | |
let query_string = query["oauth_request_method"] . "&" | |
let query_string .= http#encodeURI(a:url) | |
let query_string .= "&" | |
let query_string .= http#encodeURI(http#encodeURI(query)) | |
let hmacsha1 = hmac#sha1(http#encodeURI(a:ctx.consumer_secret) . "&" . http#encodeURI(a:ctx.access_token_secret), que let query["oauth_signature"] = base64#b64encodebin(hmacsha1) | |
+ for key in keys(getdata) | |
+ call remove(query, key) | |
+ endfor | |
let auth = 'OAuth ' | |
for key in sort(keys(query)) | |
let auth .= key . '="' . http#encodeURI(query[key]) . '", ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment