Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninnypants/dcacca819e0c86a938f160f9e0ce7881 to your computer and use it in GitHub Desktop.
Save ninnypants/dcacca819e0c86a938f160f9e0ce7881 to your computer and use it in GitHub Desktop.
request_token_base_string = 'POST&' + CGI.escape("#{Pazienti2::Application::BLOG_URL}oauth1/request") + "&" + request_token_url.query
hmac = OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), params[:oauth_consumer_secret].encode("ASCII") + '&' + '', request_token_base_string.encode("ASCII"))
signature = Base64.encode64(hmac).chomp
request_token_params[:oauth_signature] = signature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment