lib/ruby-box/session.rb in ruby-box-1.0.1 vs lib/ruby-box/session.rb in ruby-box-1.0.3
- old
+ new
@@ -9,11 +9,11 @@
:token_url => "/api/oauth2/token"
}
def initialize(opts={})
if opts[:client_id]
- @oauth2_client = OAuth2::Client.new(opts[:client_id], opts[:client_secret], OAUTH2_URLS)
+ @oauth2_client = OAuth2::Client.new(opts[:client_id], opts[:client_secret], OAUTH2_URLS.dup)
@access_token = OAuth2::AccessToken.new(@oauth2_client, opts[:access_token]) if opts[:access_token]
else # Support legacy API for historical reasons.
@api_key = opts[:api_key]
@auth_token = opts[:auth_token]
end
@@ -100,6 +100,6 @@
raise RubyBox::ServerError, parsed_body["message"]
end
raw ? body : parsed_body
end
end
-end
\ No newline at end of file
+end