mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-12-07 00:00:35 -05:00
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:
parent
69a96ecc4b
commit
56d7c98945
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user