class SafeDb::Authenticate
Parent to use cases like Init
and Login
that perform early initialize workflows.
Attributes
book_name[W]
This authorization use case should always have a book name provided and sometimes may have a password parameter.
password[W]
This authorization use case should always have a book name provided and sometimes may have a password parameter.
Private Instance Methods
contains_all_master_book_indices( data_map )
click to toggle source
# File lib/controller/abstract/authenticate.rb, line 33 def contains_all_master_book_indices( data_map ) return false unless data_map.contains?( Indices::CONTENT_RANDOM_IV ) return false unless data_map.contains?( Indices::CONTENT_IDENTIFIER ) return false unless data_map.contains?( Indices::CRYPT_CIPHER_TEXT ) return false unless data_map.contains?( Indices::COMMIT_IDENTIFIER ) return true end
is_book_initialized?()
click to toggle source
Return true if the human secret for the parameter application name has been collected, transformed into a key, that key used to lock the power key, then secret and keys deleted, plus a trail of breadcrumbs sprinkled to allow the branch crypt key to be regenerated at the next login.
# File lib/controller/abstract/authenticate.rb, line 22 def is_book_initialized?() return false unless File.exists?( Indices::MASTER_INDICES_FILEPATH ) data_map = DataMap.new( Indices::MASTER_INDICES_FILEPATH ) return false unless data_map.has_section?( @book_id ) data_map.use( @book_id ) return contains_all_master_book_indices( data_map ) end