From c7758506143b4d8fdf156f1ac48fdcf6f25714e8 Mon Sep 17 00:00:00 2001 From: Mike Emery Date: Wed, 10 Nov 2010 15:23:48 -0800 Subject: [PATCH] making signed attributes public so that it can be used with 3rd party http request libraries to use oauth through query string --- lib/simple_oauth.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/simple_oauth.rb b/lib/simple_oauth.rb index acb443b..1ad294e 100644 --- a/lib/simple_oauth.rb +++ b/lib/simple_oauth.rb @@ -67,15 +67,15 @@ module SimpleOAuth valid end + def signed_attributes + attributes.merge(:oauth_signature => signature) + end + private def normalized_attributes signed_attributes.sort_by{|k,v| k.to_s }.map{|k,v| %(#{k}="#{self.class.encode(v)}") }.join(', ') end - def signed_attributes - attributes.merge(:oauth_signature => signature) - end - def attributes ATTRIBUTE_KEYS.inject({}){|a,k| options.key?(k) ? a.merge(:"oauth_#{k}" => options[k]) : a } end