Class: SafeDb::Token

Inherits:
Controller show all
Defined in:
lib/controller/access/token.rb

Overview

The token use case prints out an encrypted shell token tied to the workstation and shell environment. See the root README.md on how to export it and create a simple command alias for it in the ~/.bash_aliases script which is executed when the shell starts.

Instance Method Summary collapse

Methods inherited from Controller

#check_post_conditions, #check_pre_conditions, #flow, #initialize, #open_remote_backend_location, #post_validation, #read_verse, #set_verse, #update_verse

Constructor Details

This class inherits a constructor from SafeDb::Controller

Instance Method Details

#executeObject



12
13
14
15
16
# File 'lib/controller/access/token.rb', line 12

def execute

  print KeyDerivation.generate_shell_key_and_token()

end

#pre_validationObject

Perform pre-conditional validations in preparation to executing the main flow of events for this use case. This method may throw the below exceptions.

Raises:

  • (SafeDirNotConfigured)

    if the safe’s url has not been configured

  • (EmailAddrNotConfigured)

    if the email address has not been configured

  • (StoreUrlNotConfigured)

    if the crypt store url is not configured



25
26
27
28
# File 'lib/controller/access/token.rb', line 25

def pre_validation


end