Class: Booth::Userland::Logins::Transitions::New::ModeUsernamePasswordAndWebauth

Inherits:
Object
  • Object
show all
Includes:
Concerns::Transition, Fallible
Defined in:
lib/booth/userland/logins/transitions/new/mode_username_password_and_webauth.rb

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
# File 'lib/booth/userland/logins/transitions/new/mode_username_password_and_webauth.rb', line 10

def call
  if storage.password_authenticated_credential
    debug { 'I have your username and your password, now I need your Webauth' }
    fail_with :need_webauth, step: :enter_webauth
  else
    debug { 'I have your username but not your password, let alone your Webauth' }
    fail_with :need_password_and_webauth, step: :enter_password
  end
end