lib/soaspec/o_auth2.rb in soaspec-0.1.8 vs lib/soaspec/o_auth2.rb in soaspec-0.1.9
- old
+ new
@@ -9,9 +9,10 @@
# @param [Hash] params Parameters to make OAuth request
# @param [String] api_username Username to use which can be set by Soaspec::ExchangeHandler
def initialize(params, api_username)
raise 'client_id and client_secret not set' unless params[:client_id] && params[:client_secret]
+ raise 'token_url mandatory' unless params[:token_url]
self.params = params
params[:username] = api_username || ERB.new(params[:username]).result(binding) if params[:username]
params[:security_token] = ERB.new(params[:security_token]).result(binding) if params[:security_token]
params[:token_url] = ERB.new(params[:token_url]).result(binding) if params[:token_url]
params[:password] = ERB.new(params[:password]).result(binding) if params[:password]
\ No newline at end of file