Module: Brightbox::Config::TwoFactorHelper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#two_factor_helper_passwordObject

Return the two_factor code from the helper if it’s possible



11
12
13
14
15
16
17
18
19
# File 'lib/brightbox-cli/config/two_factor_helper.rb', line 11

def two_factor_helper_password
  if defined?(@two_factor_helper_password) && !@two_factor_helper_password.nil?
    return @two_factor_helper_password
  end

  @two_factor_helper_password = if two_factor_helper_command
                                  two_factor_helper_call
                                end
end

Instance Method Details

#two_factor_helper_commandObject



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

def two_factor_helper_command
  return config[client_name]["two_factor_helper_command"] unless client_name.nil?
end