module Brightbox::Config::TwoFactorAuth
Constants
- ENTER_TWO_FACTOR_PROMPT
Attributes
Public Instance Methods
Source
# File lib/brightbox-cli/config/two_factor_auth.rb, line 8 def discover_two_factor_pin @two_factor_pin ||= Brightbox.config.two_factor_helper_password @two_factor_pin ||= prompt_for_two_factor_pin self.current_second_factor = @two_factor_pin end
Private Instance Methods
Source
# File lib/brightbox-cli/config/two_factor_auth.rb, line 24 def prompt_for_two_factor_pin require "highline" highline = HighLine.new # FIXME: Capture interupts if user aborts highline.ask(ENTER_TWO_FACTOR_PROMPT) end
Source
# File lib/brightbox-cli/config/two_factor_auth.rb, line 17 def two_factor_enabled return false unless client_name.nil? return true if config[client_name]["two_factor"] == "true" false end