Class: WSDL::HTTPAdapter::Config
- Inherits:
-
Object
- Object
- WSDL::HTTPAdapter::Config
- Defined in:
- lib/wsdl/http_adapter/config.rb
Overview
Holds timeout, SSL, and redirect settings applied to each +Net::HTTP+ request.
Instance Attribute Summary collapse
-
#ca_file ⇒ String?
Path to a CA certificate file.
-
#ca_path ⇒ String?
Path to a directory of CA certificates.
-
#cert ⇒ OpenSSL::X509::Certificate?
Client certificate for mutual TLS.
-
#key ⇒ OpenSSL::PKey::PKey?
Client private key for mutual TLS.
-
#max_redirects ⇒ Integer
Maximum number of redirects to follow.
-
#max_version ⇒ Symbol?
Maximum SSL/TLS version.
-
#min_version ⇒ Symbol?
Minimum SSL/TLS version (e.g. +:TLS1_2+).
-
#open_timeout ⇒ Integer
Connection timeout in seconds.
-
#read_timeout ⇒ Integer
Read timeout in seconds.
-
#verify_mode ⇒ Integer
SSL verification mode (e.g. +OpenSSL::SSL::VERIFY_PEER+).
-
#write_timeout ⇒ Integer
Write timeout in seconds.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
Creates a new Config with secure defaults.
Constructor Details
#initialize ⇒ Config
Creates a new Config with secure defaults.
62 63 64 65 66 67 68 |
# File 'lib/wsdl/http_adapter/config.rb', line 62 def initialize @open_timeout = DEFAULT_OPEN_TIMEOUT @write_timeout = DEFAULT_WRITE_TIMEOUT @read_timeout = DEFAULT_READ_TIMEOUT @max_redirects = DEFAULT_REDIRECT_LIMIT @verify_mode = OpenSSL::SSL::VERIFY_PEER end |
Instance Attribute Details
#ca_file ⇒ String?
Returns path to a CA certificate file.
44 45 46 |
# File 'lib/wsdl/http_adapter/config.rb', line 44 def ca_file @ca_file end |
#ca_path ⇒ String?
Returns path to a directory of CA certificates.
47 48 49 |
# File 'lib/wsdl/http_adapter/config.rb', line 47 def ca_path @ca_path end |
#cert ⇒ OpenSSL::X509::Certificate?
Returns client certificate for mutual TLS.
50 51 52 |
# File 'lib/wsdl/http_adapter/config.rb', line 50 def cert @cert end |
#key ⇒ OpenSSL::PKey::PKey?
Returns client private key for mutual TLS.
53 54 55 |
# File 'lib/wsdl/http_adapter/config.rb', line 53 def key @key end |
#max_redirects ⇒ Integer
Returns maximum number of redirects to follow.
38 39 40 |
# File 'lib/wsdl/http_adapter/config.rb', line 38 def max_redirects @max_redirects end |
#max_version ⇒ Symbol?
Returns maximum SSL/TLS version.
59 60 61 |
# File 'lib/wsdl/http_adapter/config.rb', line 59 def max_version @max_version end |
#min_version ⇒ Symbol?
Returns minimum SSL/TLS version (e.g. +:TLS1_2+).
56 57 58 |
# File 'lib/wsdl/http_adapter/config.rb', line 56 def min_version @min_version end |
#open_timeout ⇒ Integer
Returns connection timeout in seconds.
29 30 31 |
# File 'lib/wsdl/http_adapter/config.rb', line 29 def open_timeout @open_timeout end |
#read_timeout ⇒ Integer
Returns read timeout in seconds.
35 36 37 |
# File 'lib/wsdl/http_adapter/config.rb', line 35 def read_timeout @read_timeout end |
#verify_mode ⇒ Integer
Returns SSL verification mode (e.g. +OpenSSL::SSL::VERIFY_PEER+).
41 42 43 |
# File 'lib/wsdl/http_adapter/config.rb', line 41 def verify_mode @verify_mode end |
#write_timeout ⇒ Integer
Returns write timeout in seconds.
32 33 34 |
# File 'lib/wsdl/http_adapter/config.rb', line 32 def write_timeout @write_timeout end |