lib/deepsecurity/manager.rb
# Authenticates a user within the given tenant, and returns a session ID for use when calling other methods of Manager.
# When no longer required, the session should be terminated by calling disconnect.
# @param tenant [String]
# @param username [String]
# @param password [String]
# @return [Manager] The current manager

Authenticates a user within the given tenant, and returns a session ID for use when calling other methods of Manager.
When no longer required, the session should be terminated by calling disconnect.
Authenticates a user within the given tenant and returns a session ID for use when calling other methods of Manager . When no longer required the session should be terminated by calling disconnect .
def connect(tenant, username, password)
      @sID = (tenant.blank? ? interface.authenticate(username, password) : interface.authenticateTenant(tenant, username, password)).to_s
      self
    rescue Savon::SOAPFault => error
      fault = error.to_hash[:fault]
      message = fault[:faultstring].to_s
      message = fault[:detail][:exception_name].to_s if message.blank?
      raise AuthenticationFailedException.new("(#{message})")
    end
def connect ( tenant , username , password ) @sID = ( tenant . blank? ? interface . authenticate ( username , password ) : interface . authenticateTenant ( tenant , username , password ) ) . to_s self rescue Savon :: SOAPFault => error fault = error . to_hash [ :fault ] message = fault [ :faultstring ] . to_s message = fault [ :detail ] [ :exception_name ] . to_s if message . blank? raise AuthenticationFailedException . new ( "(#{message})" ) end
Authenticates a user within the given tenant, and returns a session ID for use when calling other methods of Manager.
Authenticates a user within the given tenant and returns a session ID for use when calling other methods of Manager .
The current manager
The current manager
Manager
tenant
<not_specific>
username
<not_specific>
password
<not_specific>
<not_specific>
None