Method: RbVmomi::SSO#initialize

Defined in:
lib/rbvmomi/sso.rb

#initialize(opts = {}) ⇒ SSO

Creates an instance of an SSO object

Parameters:

  • opts (Hash) (defaults to: {})

    the options to create the object with

Options Hash (opts):

  • :host (String)

    the host to connect to

  • :port (Fixnum) — default: 443

    the port to connect to

  • :path (String)

    the path to call

  • :user (String)

    the user to authenticate with

  • :password (String)

    the password to authenticate with

  • :private_key (String)

    the private key to use

  • :certificate (String)

    the certificate to use

  • :insecure (Boolean) — default: false

    whether to connect insecurely



50
51
52
53
54
55
56
57
58
59
# File 'lib/rbvmomi/sso.rb', line 50

def initialize(opts = {})
  @host     = opts[:host]
  @insecure = opts.fetch(:insecure, false)
  @password = opts[:password]
  @path     = opts.fetch(:path, STS_PATH)
  @port     = opts.fetch(:port, 443)
  @user     = opts[:user]

  load_x509(opts[:private_key], opts[:certificate])
end