Class: WinRM::WinRMWebService
- Inherits:
-
Object
- Object
- WinRM::WinRMWebService
- Defined in:
- lib/winrm/winrm_service_patch.rb
Instance Method Summary collapse
-
#initialize(endpoint, transport = :kerberos, opts = {}) ⇒ WinRMWebService
constructor
A new instance of WinRMWebService.
Constructor Details
#initialize(endpoint, transport = :kerberos, opts = {}) ⇒ WinRMWebService
Returns a new instance of WinRMWebService.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/winrm/winrm_service_patch.rb', line 15 def initialize(endpoint, transport = :kerberos, opts = {}) @endpoint = endpoint @timeout = DEFAULT_TIMEOUT @max_env_sz = DEFAULT_MAX_ENV_SIZE @locale = DEFAULT_LOCALE case transport when :kerberos require 'gssapi' # TODO: check fo keys and throw error if missing @xfer = HTTP::HttpGSSAPI.new(endpoint, opts[:realm], opts[:service], opts[:keytab], opts) when :plaintext @xfer = HTTP::HttpPlaintext.new(endpoint, opts[:user], opts[:pass], opts) when :sspinegotiate @xfer = HTTP::HttpSSPINegotiate.new(endpoint, opts[:user], opts[:pass], opts) when :ssl @xfer = HTTP::HttpSSL.new(endpoint, opts[:user], opts[:pass], opts[:ca_trust_path], opts) end end |