Chris Varenhorst
unread,Oct 6, 2011, 5:32:49 PM10/6/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OAuth Ruby
Can't seem to find much documentation on this. It seems when I
set :signature_method the only option that works is "HMAC-SHA1".
Anything else I want (plaintext) and I get an
OAuth::Signature::UnknownSignatureMethod.
Here's some example code..
@oauth_conf = {
:site => "https://" + API_SERVER,
:scheme => :header,
:http_method => :post,
:request_token_url => "/#{API_VERSION}/oauth/
request_token",
:access_token_url => "/#{API_VERSION}/oauth/access_token",
:authorize_url => "/#{API_VERSION}/oauth/authorize",
:signature_method => "plaintext",
}
@consumer = OAuth::Consumer.new(@consumer_key,
@consumer_secret, @oauth_conf)
here's the stack trace..
gems/oauth-0.4.5/lib/oauth/signature.rb:17:in `build': plaintext
(OAuth::Signature::UnknownSignatureMethod)
gems/oauth-0.4.5/lib/oauth/signature.rb:40:in
`body_hash'
gems/ruby-1.9.2-p180/gems/oauth-0.4.5/lib/oauth/client/helper.rb:60:in
`hash_body'
gems/oauth-0.4.5/lib/oauth/client/net_http.rb:29:in
`oauth!'
gems/ruby-1.9.2-p180/gems/oauth-0.4.5/lib/oauth/consumer.rb:227:in
`sign!'
gems/ruby-1.9.2-p180/gems/oauth-0.4.5/lib/oauth/consumer.rb:191:in
`create_signed_request'
gems/oauth-0.4.5/lib/oauth/consumer.rb:162:in
`request'
gems/ruby-1.9.2-p180/gems/oauth-0.4.5/lib/oauth/consumer.rb:197:in
`token_request'
gems/ruby-1.9.2-p180/gems/oauth-0.4.5/lib/oauth/consumer.rb:139:in
`get_request_token'
lib/api_sdk.rb:41:in `get_request_token
any ideas?