Module: Devise::Models::TwoFactorAuthenticatable

Extended by:
ActiveSupport::Concern
Defined in:
lib/two_factor_authentication/models/two_factor_authenticatable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#generate_two_factor_codeObject



15
16
17
# File 'lib/two_factor_authentication/models/two_factor_authenticatable.rb', line 15

def generate_two_factor_code
  self.class..gen
end

#max_login_attempts?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/two_factor_authentication/models/two_factor_authenticatable.rb', line 23

def 
  second_factor_attempts_count >= self.class.
end

#need_two_factor_authentication?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/two_factor_authentication/models/two_factor_authenticatable.rb', line 11

def need_two_factor_authentication?
  true
end

#send_two_factor_authentication_code(code) ⇒ Object



19
20
21
# File 'lib/two_factor_authentication/models/two_factor_authenticatable.rb', line 19

def send_two_factor_authentication_code(code)
  p "Code is #{code}"
end