Class: SafeDb::Token
Overview
The token use case prints out an encrypted session 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.
Constant Summary
Constants inherited from UseCase
UseCase::APP_DIR_NAME, UseCase::COMMANDMENT, UseCase::ENV_VAR_KEY_NAME, UseCase::ENV_VAR_PREFIX_A, UseCase::ENV_VAR_PREFIX_B, UseCase::FILE_CONTENT_KEY, UseCase::FILE_KEY_PREFIX, UseCase::FILE_NAME_KEY
Instance Attribute Summary
Attributes inherited from UseCase
Instance Method Summary collapse
- #execute ⇒ Object
-
#pre_validation ⇒ Object
Perform pre-conditional validations in preparation to executing the main flow of events for this use case.
Methods inherited from UseCase
#check_post_conditions, #check_pre_conditions, #cleanup, #config_directory, #config_file, #flow_of_events, #get_master_database, #initialize, #post_validation
Constructor Details
This class inherits a constructor from SafeDb::UseCase
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 |
# File 'lib/usecase/token.rb', line 12 def execute print KeyLocal.generate_shell_key_and_token() end |
#pre_validation ⇒ Object
Perform pre-conditional validations in preparation to executing the main flow of events for this use case. This method may throw the below exceptions.
25 26 27 28 |
# File 'lib/usecase/token.rb', line 25 def pre_validation end |