Class: Booth::Models::Authenticator
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Booth::Models::Authenticator
- Defined in:
- lib/booth/models/authenticator.rb
Overview
A WebAuthn Passkey.
Instance Method Summary collapse
Instance Method Details
#confirmed? ⇒ Boolean
25 26 27 |
# File 'lib/booth/models/authenticator.rb', line 25 def confirmed? confirmed_at.present? end |
#generate_webauth_id ⇒ Object
21 22 23 |
# File 'lib/booth/models/authenticator.rb', line 21 def generate_webauth_id self.webauthn_id = ::WebAuthn.generate_user_id end |
#provider_attributes ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/booth/models/authenticator.rb', line 29 def provider_attributes return {} unless aaguid provider = ::Booth::Core::Webauth::Provider.find(aaguid) return {} unless provider { provider_name: provider.name, provider_icon_dark: provider.icon_dark, provider_icon_light: provider.icon_light } end |
#step ⇒ Object
40 41 42 |
# File 'lib/booth/models/authenticator.rb', line 40 def step ::Booth::Core::Authenticators::Step.call(self) end |