Class: TwoFactorAuth::Registration

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/two_factor_auth/registration.rb

Class Method Summary collapse

Class Method Details

.authenticated(login, counter) ⇒ Object



11
12
13
14
15
16
# File 'app/models/two_factor_auth/registration.rb', line 11

def self.authenticated , counter
  reg = .registrations.first
  reg.last_authenticated_at = Time.now
  reg.counter = counter
  reg.save!
end

.key_handle_for_authentication(login) ⇒ Object



7
8
9
# File 'app/models/two_factor_auth/registration.rb', line 7

def self.key_handle_for_authentication 
  .registrations.first.key_handle
end