Class: Common::Client::Configuration::SOAP
- Defined in:
- lib/common/client/configuration/soap.rb
Overview
Configuration for SOAP based services.
Direct Known Subclasses
HCA::Configuration, HCA::EnrollmentEligibility::Configuration, MPI::Configuration, Preneeds::Configuration
Instance Attribute Summary
Attributes inherited from Base
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary collapse
-
#allow_missing_certs? ⇒ Boolean
Used to allow testing without SSL certs in place.
-
#ssl_cert ⇒ Object
Reads in the SSL cert to use for the connection.
-
#ssl_key ⇒ Object
Reads in the SSL key to use for the connection.
Methods inherited from Base
#base_path, #breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception, #service_name
Instance Method Details
#allow_missing_certs? ⇒ Boolean
Used to allow testing without SSL certs in place. Override this method in sub-classes.
83 84 85 |
# File 'lib/common/client/configuration/soap.rb', line 83 def allow_missing_certs? false end |
#ssl_cert ⇒ Object
Reads in the SSL cert to use for the connection
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/common/client/configuration/soap.rb', line 50 def ssl_cert OpenSSL::X509::Certificate.new(File.read(self.class.ssl_cert_path)) rescue => e # :nocov: unless allow_missing_certs? Rails.logger.warn "Could not load #{service_name} SSL cert: #{e.}" raise e if Rails.env.production? end nil # :nocov: end |
#ssl_key ⇒ Object
Reads in the SSL key to use for the connection
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/common/client/configuration/soap.rb', line 67 def ssl_key OpenSSL::PKey::RSA.new(File.read(self.class.ssl_key_path)) rescue => e # :nocov: Rails.logger.warn "Could not load #{service_name} SSL key: #{e.}" raise e if Rails.env.production? nil # :nocov: end |