Class: WebAuthn::PublicKeyCredential::Options
- Inherits:
-
Object
- Object
- WebAuthn::PublicKeyCredential::Options
- Includes:
- JSONSerializer
- Defined in:
- lib/webauthn/public_key_credential/options.rb
Direct Known Subclasses
Constant Summary collapse
- CHALLENGE_LENGTH =
32
Instance Attribute Summary collapse
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#relying_party ⇒ Object
readonly
Returns the value of attribute relying_party.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
- #challenge ⇒ Object
-
#initialize(timeout: nil, extensions: nil, relying_party: WebAuthn.configuration.relying_party) ⇒ Options
constructor
A new instance of Options.
Methods included from JSONSerializer
Constructor Details
#initialize(timeout: nil, extensions: nil, relying_party: WebAuthn.configuration.relying_party) ⇒ Options
Returns a new instance of Options.
14 15 16 17 18 |
# File 'lib/webauthn/public_key_credential/options.rb', line 14 def initialize(timeout: nil, extensions: nil, relying_party: WebAuthn.configuration.) @relying_party = @timeout = timeout || default_timeout @extensions = default_extensions.merge(extensions || {}) end |
Instance Attribute Details
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
12 13 14 |
# File 'lib/webauthn/public_key_credential/options.rb', line 12 def extensions @extensions end |
#relying_party ⇒ Object (readonly)
Returns the value of attribute relying_party.
12 13 14 |
# File 'lib/webauthn/public_key_credential/options.rb', line 12 def @relying_party end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
12 13 14 |
# File 'lib/webauthn/public_key_credential/options.rb', line 12 def timeout @timeout end |
Instance Method Details
#challenge ⇒ Object
20 21 22 |
# File 'lib/webauthn/public_key_credential/options.rb', line 20 def challenge encoder.encode(raw_challenge) end |