Class: HasSecurePasskey::OptionsForGet
- Inherits:
-
Object
- Object
- HasSecurePasskey::OptionsForGet
- Defined in:
- lib/has_secure_passkey/options_for_get.rb
Class Method Summary collapse
Instance Method Summary collapse
- #as_json ⇒ Object
- #challenge ⇒ Object
-
#initialize(challenge: nil) ⇒ OptionsForGet
constructor
A new instance of OptionsForGet.
- #message ⇒ Object
Constructor Details
#initialize(challenge: nil) ⇒ OptionsForGet
Returns a new instance of OptionsForGet.
12 13 14 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 12 def initialize(challenge: nil) @challenge = challenge end |
Class Method Details
.from_message(message) ⇒ Object
7 8 9 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 7 def () new(**verifier.verify().symbolize_keys) end |
.verifier ⇒ Object
3 4 5 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 3 def verifier Rails.application.("passkey_login") end |
Instance Method Details
#as_json ⇒ Object
24 25 26 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 24 def as_json { publicKey: credential.as_json } end |
#challenge ⇒ Object
20 21 22 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 20 def challenge @challenge ||= credential.challenge end |
#message ⇒ Object
16 17 18 |
# File 'lib/has_secure_passkey/options_for_get.rb', line 16 def self.class.verifier.generate({ challenge: }) end |