Switch from Basic to Bearer auth

Stripe will be supporting Basic auth for the indefinite future, but
our API keys map onto Bearer auth more cleanly, and using it lets us
get rid of the base64 encoding step.
This commit is contained in:
Evan Broder 2012-04-30 14:41:46 -07:00
parent 69a96ecc4b
commit 56d7c98945

View File

@ -554,12 +554,12 @@ module Stripe
end
headers = {
:user_agent => "Stripe/v1 RubyBindings/#{Stripe::VERSION}"
:user_agent => "Stripe/v1 RubyBindings/#{Stripe::VERSION}",
:authorization => "Bearer #{api_key}"
}.merge(headers)
opts = {
:method => method,
:url => url,
:user => api_key,
:headers => headers,
:open_timeout => 30,
:payload => payload,