lib/soaspec/o_auth2.rb in soaspec-0.2.8 vs lib/soaspec/o_auth2.rb in soaspec-0.2.9
- old
+ new
@@ -36,10 +36,11 @@
self.retry_count = 0 # No initial tries at getting access token
params = params_sent.transform_keys_to_symbols
params[:token_url] ||= Soaspec::OAuth2.token_url
raise ArgumentError, 'client_id and client_secret not set' unless params[:client_id] && params[:client_secret]
raise ArgumentError, '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]
@@ -97,6 +98,6 @@
else
{ grant_type: 'client_credentials' }
end)
end
end
-end
\ No newline at end of file
+end