Class: WebAuthn::PublicKeyCredential::RequestOptions
- Defined in:
- lib/webauthn/public_key_credential/request_options.rb
Constant Summary
Constants inherited from Options
Instance Attribute Summary collapse
-
#allow ⇒ Object
Returns the value of attribute allow.
-
#rp_id ⇒ Object
Returns the value of attribute rp_id.
-
#user_verification ⇒ Object
Returns the value of attribute user_verification.
Attributes inherited from Options
#extensions, #relying_party, #timeout
Instance Method Summary collapse
- #allow_credentials ⇒ Object
-
#initialize(rp_id: nil, allow_credentials: nil, allow: nil, user_verification: nil, **keyword_arguments) ⇒ RequestOptions
constructor
A new instance of RequestOptions.
Methods inherited from Options
Methods included from JSONSerializer
Constructor Details
#initialize(rp_id: nil, allow_credentials: nil, allow: nil, user_verification: nil, **keyword_arguments) ⇒ RequestOptions
Returns a new instance of RequestOptions.
10 11 12 13 14 15 16 17 |
# File 'lib/webauthn/public_key_credential/request_options.rb', line 10 def initialize(rp_id: nil, allow_credentials: nil, allow: nil, user_verification: nil, **keyword_arguments) super(**keyword_arguments) @rp_id = rp_id || .id @allow_credentials = allow_credentials @allow = allow @user_verification = user_verification end |
Instance Attribute Details
#allow ⇒ Object
Returns the value of attribute allow.
8 9 10 |
# File 'lib/webauthn/public_key_credential/request_options.rb', line 8 def allow @allow end |
#rp_id ⇒ Object
Returns the value of attribute rp_id.
8 9 10 |
# File 'lib/webauthn/public_key_credential/request_options.rb', line 8 def rp_id @rp_id end |
#user_verification ⇒ Object
Returns the value of attribute user_verification.
8 9 10 |
# File 'lib/webauthn/public_key_credential/request_options.rb', line 8 def user_verification @user_verification end |
Instance Method Details
#allow_credentials ⇒ Object
19 20 21 |
# File 'lib/webauthn/public_key_credential/request_options.rb', line 19 def allow_credentials @allow_credentials || allow_credentials_from_allow || [] end |