Header parsing and validation tests pass.

Private key behaves when nil and signature is never included in normalized parameters.
This commit is contained in:
laserlemon 2010-10-11 23:54:37 -04:00
parent 2a9f21f708
commit 090f1de829

View file

@ -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