mirror of
https://github.com/samsonjs/simple_oauth.git
synced 2026-03-25 08:45:54 +00:00
Header parsing and validation tests pass.
Private key behaves when nil and signature is never included in normalized parameters.
This commit is contained in:
parent
2a9f21f708
commit
090f1de829
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue