Class: Temporalio::Connection::TlsOptions
- Inherits:
-
Object
- Object
- Temporalio::Connection::TlsOptions
- Defined in:
- lib/temporalio/connection/tls_options.rb
Instance Attribute Summary collapse
-
#client_cert ⇒ Object
readonly
Client certificate used to authenticate with the server.
-
#client_private_key ⇒ Object
readonly
Client private key used to authenticate with the server.
-
#server_name_override ⇒ Object
readonly
Overrides the target name used for validation of the server SSL certificate.
-
#server_root_ca_cert ⇒ Object
readonly
Root CA certificate used by the server.
Instance Method Summary collapse
-
#initialize(server_root_ca_cert: nil, client_cert: nil, client_private_key: nil, server_name_override: nil) ⇒ TlsOptions
constructor
A new instance of TlsOptions.
Constructor Details
#initialize(server_root_ca_cert: nil, client_cert: nil, client_private_key: nil, server_name_override: nil) ⇒ TlsOptions
Returns a new instance of TlsOptions.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/temporalio/connection/tls_options.rb', line 34 def initialize( server_root_ca_cert: nil, client_cert: nil, client_private_key: nil, server_name_override: nil ) if (client_cert && !client_private_key) || (!client_cert && client_private_key) raise ArgumentError, 'client_cert and client_private_key must be either both set or both unset' end @server_root_ca_cert = server_root_ca_cert @client_cert = client_cert @client_private_key = client_private_key @server_name_override = server_name_override end |
Instance Attribute Details
#client_cert ⇒ Object (readonly)
Client certificate used to authenticate with the server. If set, a corresponding ‘client_private_key` must be provided.
14 15 16 |
# File 'lib/temporalio/connection/tls_options.rb', line 14 def client_cert @client_cert end |
#client_private_key ⇒ Object (readonly)
Client private key used to authenticate with the server. Required if ‘client_cert` is set.
17 18 19 |
# File 'lib/temporalio/connection/tls_options.rb', line 17 def client_private_key @client_private_key end |
#server_name_override ⇒ Object (readonly)
Overrides the target name used for validation of the server SSL certificate. If not specified, the server certificate will be checked against the host part of the connection target address. This should be used for testing only.
Leave unset for Temporal Cloud.
26 27 28 |
# File 'lib/temporalio/connection/tls_options.rb', line 26 def server_name_override @server_name_override end |
#server_root_ca_cert ⇒ Object (readonly)
Root CA certificate used by the server. If not set, the server’s certificate will be validated against the operating system’s root certificates.
Leave unset for Temporal Cloud.
8 9 10 |
# File 'lib/temporalio/connection/tls_options.rb', line 8 def server_root_ca_cert @server_root_ca_cert end |