Class: TwoFactorAuth::Registration
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TwoFactorAuth::Registration
- 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 login, counter reg = login.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 login login.registrations.first.key_handle end |