lib/dsc/command.rb
# Provides an authenticated connection to the DeepSecurity Manager  while executing the block.
# @yieldparam manager [DeepSecurity::Manager] DeepSecurity Manager
# @yield [manager] Gives the manager to the block
# @return [void]
Provides an authenticated connection to the DeepSecurity Manager  while executing the block.
Provides an authenticated connection to the DeepSecurity Manager while executing the block .
def authenticate
      connect do |manager|
        begin
          manager.connect(@tenant, @username, @password)
          yield manager
        rescue DeepSecurity::AuthenticationFailedException => e
          puts "Authentication failed! #{e.message}"
        ensure
          manager.disconnect()
        end
      end
    end
def authenticate connect do | manager | begin manager . connect ( @tenant , @username , @password ) yield manager rescue DeepSecurity :: AuthenticationFailedException => e puts "Authentication failed! #{e.message}" ensure manager . disconnect ( ) end end end
Provides an authenticated connection to the DeepSecurity Manager  while executing the block.
Provides an authenticated connection to the DeepSecurity Manager while executing the block .
None
void
manager
<not_specific>
None
]
<not_specific>
Gives the manager to the block
Gives the manager to the block