From 56d7c98945b44dadb76ecae0dc56d9676a27c8ee Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 30 Apr 2012 14:41:46 -0700 Subject: [PATCH] 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. --- lib/stripe.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stripe.rb b/lib/stripe.rb index d465a65c..d5316c17 100644 --- a/lib/stripe.rb +++ b/lib/stripe.rb @@ -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,