Module: Brightbox::Config::TwoFactorAuth

Included in:
BBConfig
Defined in:
lib/brightbox-cli/config/two_factor_auth.rb

Constant Summary collapse

ENTER_TWO_FACTOR_PROMPT =
"Enter your two factor pin : ".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_second_factorObject

Returns the value of attribute current_second_factor.



6
7
8
# File 'lib/brightbox-cli/config/two_factor_auth.rb', line 6

def current_second_factor
  @current_second_factor
end

Instance Method Details

#discover_two_factor_pinObject



8
9
10
11
12
13
# 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