lib/oauthenticator/signable_request.rb in oauthenticator-1.4.0 vs lib/oauthenticator/signable_request.rb in oauthenticator-1.4.1
- old
+ new
@@ -199,11 +199,11 @@
normalized_request_params.map { |kv| kv.map { |v| OAuthenticator.escape(v) } }.sort.map { |p| p.join('=') }.join('&')
end
# section 3.4.1.3
#
- # @return [Array<Array<String> (size 2)>]
+ # @return [Array<Array<String, nil> (size 2)>]
def normalized_request_params
query_params + protocol_params.reject { |k,v| %w(realm oauth_signature).include?(k) }.to_a + entity_params
end
# section 3.4.1.3.1
@@ -279,10 +279,10 @@
# whether we will hash the body, per oauth request body hash section 4.1, as well as whether the caller
# said to
#
# @return [Boolean]
def hash_body?
- BODY_HASH_METHODS[signature_method] && !form_encoded? &&
+ BODY_HASH_METHODS.key?(signature_method) && !form_encoded? &&
(@attributes.key?('hash_body?') ? @attributes['hash_body?'] : true)
end
# signature method
#