lib/nimbu-api/request/oauth2.rb in nimbu-api-0.3.0 vs lib/nimbu-api/request/oauth2.rb in nimbu-api-0.4.0
- old
+ new
@@ -15,11 +15,10 @@
def call(env)
# Extract parameters from the query
params = { ACCESS_TOKEN => @token }.update query_params(env[:url])
if token = params[ACCESS_TOKEN] and !token.empty?
- env[:url].query = build_query params
- env[:request_headers].merge!(AUTH_HEADER => "Token token=\"#{token}\"")
+ env[:request_headers].merge!(AUTH_HEADER => "bearer #{token}")
end
@app.call env
end