Class: HasSecurePasskey::AuthenticateBy
- Inherits:
-
Object
- Object
- HasSecurePasskey::AuthenticateBy
- Defined in:
- lib/has_secure_passkey/authenticate_by.rb
Instance Method Summary collapse
- #authenticated ⇒ Object
-
#initialize(model:, params:) ⇒ AuthenticateBy
constructor
A new instance of AuthenticateBy.
Constructor Details
#initialize(model:, params:) ⇒ AuthenticateBy
Returns a new instance of AuthenticateBy.
2 3 4 5 |
# File 'lib/has_secure_passkey/authenticate_by.rb', line 2 def initialize(model:, params:) @model = model @params = params end |
Instance Method Details
#authenticated ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/has_secure_passkey/authenticate_by.rb', line 7 def authenticated return @authenticated if defined?(@authenticated) @authenticated = if valid? passkey.authenticatable end end |