Sha256: 42e9cecb1843a9a6c4812e09b2b585bfefe854c336ccb36a8e57a2b7704eeff4
Contents?: true
Size: 882 Bytes
Versions: 12
Compression:
Stored size: 882 Bytes
Contents
require 'salesforce/connection/soap_api' require 'salesforce/connection/rest_api' require 'salesforce/connection/http_methods' require 'salesforce/connection/conversion' require 'salesforce/connection/async' module Salesforce module Connection include SoapApi include RestApi include HttpMethods include Conversion include Async def self.as_logged_in_user(&block) count = 0 begin Salesforce::Authentication.session_id block.call rescue RestClient::Request::Unauthorized, Savon::SOAP::Fault => e if count < 1 && (e.message.downcase.include?("unauthorized") || e.message.downcase.include?("invalid_login")) count += 1 Salesforce::Config.on_login_failure Salesforce::Authentication.logout retry else raise e end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems