lib/oauthenticator/parse_authorization.rb in oauthenticator-1.2.0 vs lib/oauthenticator/parse_authorization.rb in oauthenticator-1.3.0
- old
+ new
@@ -48,10 +48,10 @@
auth_parse_error.call("Could not parse Authorization header: #{header}\naround or after character #{scanner.pos}: #{scanner.rest}")
end
duplicates = attributes.reject { |k,v| v.size <= 1 }
if duplicates.any?
errors = duplicates.map do |k,vs|
- {k => "Received multiple instances of Authorization parameter #{k}. Received values were: #{vs.inspect}"}
+ {k => ["Received multiple instances of Authorization parameter #{k}. Received values were: #{vs.inspect}"]}
end.inject({}, &:update)
raise DuplicatedParameters.new("Received duplicate parameters: #{duplicates.keys.inspect}", errors)
end
return attributes.map { |k,v| {k => v.first} }.inject({}, &:update)
end