Class: FIS::CLI::Commands::Logout

Inherits:
FIS::Command show all
Defined in:
lib/fis/cli/commands/logout.rb

Overview

‘auth logout` - Removes the user’s authentication credentials

Instance Method Summary collapse

Methods inherited from FIS::Command

#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which

Constructor Details

#initialize(options) ⇒ Logout

Returns a new instance of Logout.



8
9
10
# File 'lib/fis/cli/commands/logout.rb', line 8

def initialize(options)
  @options = options
end

Instance Method Details

#executeObject



12
13
14
15
16
17
# File 'lib/fis/cli/commands/logout.rb', line 12

def execute
  FIS.config.unset(:identity, :portal, :token)

  FIS.ui.newline
  FIS.ui.ok('You\'ve successfully logged out.')
end