Class: RosettAi::Mcp::HttpSecurityConfig::TlsConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/mcp/http_security_config.rb

Overview

TLS sub-configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTlsConfig

Returns a new instance of TlsConfig.



86
87
88
89
90
# File 'lib/rosett_ai/mcp/http_security_config.rb', line 86

def initialize
  @enabled = false
  @cert_path = nil
  @key_path = nil
end

Instance Attribute Details

#cert_pathObject

Returns the value of attribute cert_path.



84
85
86
# File 'lib/rosett_ai/mcp/http_security_config.rb', line 84

def cert_path
  @cert_path
end

#enabledObject

Returns the value of attribute enabled.



84
85
86
# File 'lib/rosett_ai/mcp/http_security_config.rb', line 84

def enabled
  @enabled
end

#key_pathObject

Returns the value of attribute key_path.



84
85
86
# File 'lib/rosett_ai/mcp/http_security_config.rb', line 84

def key_path
  @key_path
end

Instance Method Details

#apply(hash) ⇒ void

This method returns an undefined value.

Apply TLS configuration from a hash.

Parameters:

  • hash (Hash)

    configuration values



96
97
98
99
100
101
102
# File 'lib/rosett_ai/mcp/http_security_config.rb', line 96

def apply(hash)
  return unless hash.is_a?(Hash)

  @enabled = hash['enabled'] if hash.key?('enabled')
  @cert_path = hash['cert_path'] if hash['cert_path']
  @key_path = hash['key_path'] if hash['key_path']
end