From 090f1de829c9996451a0af2a3e226864223641cf Mon Sep 17 00:00:00 2001 From: laserlemon Date: Mon, 11 Oct 2010 23:54:37 -0400 Subject: [PATCH] Header parsing and validation tests pass. Private key behaves when nil and signature is never included in normalized parameters. --- lib/simple_oauth.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/simple_oauth.rb b/lib/simple_oauth.rb index 86c83fd..68d18f4 100644 --- a/lib/simple_oauth.rb +++ b/lib/simple_oauth.rb @@ -12,7 +12,7 @@ module SimpleOAuth end class Header - ATTRIBUTE_KEYS = [:consumer_key, :nonce, :signature, :signature_method, :timestamp, :token, :version] + ATTRIBUTE_KEYS = [:consumer_key, :nonce, :signature_method, :timestamp, :token, :version] def self.default_options { @@ -89,7 +89,7 @@ module SimpleOAuth end def rsa_sha1_signature - Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), options[:private_key], signature_base)).chomp + Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), options[:private_key].to_s, signature_base)).chomp end def secret