lib/soaspec/o_auth2.rb in soaspec-0.1.7 vs lib/soaspec/o_auth2.rb in soaspec-0.1.8
- old
+ new
@@ -22,9 +22,10 @@
# @return [Hash] Hash containing access token parameters
def response
response = RestClient.post(params[:token_url], payload, cache_control: 'no_cache', verify_ssl: false)
rescue RestClient::Exception => error
Soaspec::SpecLogger.info(["oauth_error: #{error.message}", "oauth_response: #{error.response}"])
+ Soaspec::SpecLogger.info "oauth_params_used: #{params}" if Soaspec.debug_oauth?
self.retry_count += 1
sleep 0.1 # Wait if a bit before retying obtaining access token
retry if retry_count < 3
raise error
else
\ No newline at end of file