Class: Selenium::WebDriver::VirtualAuthenticatorOptions
- Inherits:
-
Object
- Object
- Selenium::WebDriver::VirtualAuthenticatorOptions
- Defined in:
- lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb
Constant Summary collapse
- PROTOCOL =
{ctap2: 'ctap2', u2f: 'ctap1/u2f'}.freeze
- TRANSPORT =
{ble: 'ble', usb: 'usb', nfc: 'nfc', internal: 'internal'}.freeze
Instance Attribute Summary collapse
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#resident_key ⇒ Object
(also: #resident_key?)
Returns the value of attribute resident_key.
-
#transport ⇒ Object
Returns the value of attribute transport.
-
#user_consenting ⇒ Object
(also: #user_consenting?)
Returns the value of attribute user_consenting.
-
#user_verification ⇒ Object
(also: #user_verification?)
Returns the value of attribute user_verification.
-
#user_verified ⇒ Object
(also: #user_verified?)
Returns the value of attribute user_verified.
Instance Method Summary collapse
- #as_json ⇒ Object private
-
#initialize(**opts) ⇒ VirtualAuthenticatorOptions
constructor
A new instance of VirtualAuthenticatorOptions.
Constructor Details
#initialize(**opts) ⇒ VirtualAuthenticatorOptions
Returns a new instance of VirtualAuthenticatorOptions.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 37 def initialize(**opts) @protocol = opts.delete(:protocol) { :ctap2 } @transport = opts.delete(:transport) { :usb } @resident_key = opts.delete(:resident_key) { false } @user_verification = opts.delete(:user_verification) { false } @user_consenting = opts.delete(:user_consenting) { true } @user_verified = opts.delete(:user_verified) { false } raise ArgumentError, "Invalid arguments: #{opts.keys}" unless opts.empty? end |
Instance Attribute Details
#protocol ⇒ Object
Returns the value of attribute protocol.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def protocol @protocol end |
#resident_key ⇒ Object Also known as: resident_key?
Returns the value of attribute resident_key.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def resident_key @resident_key end |
#transport ⇒ Object
Returns the value of attribute transport.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def transport @transport end |
#user_consenting ⇒ Object Also known as: user_consenting?
Returns the value of attribute user_consenting.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def @user_consenting end |
#user_verification ⇒ Object Also known as: user_verification?
Returns the value of attribute user_verification.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def user_verification @user_verification end |
#user_verified ⇒ Object Also known as: user_verified?
Returns the value of attribute user_verified.
31 32 33 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 31 def user_verified @user_verified end |
Instance Method Details
#as_json ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
52 53 54 55 56 57 58 59 |
# File 'lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator_options.rb', line 52 def as_json(*) {'protocol' => PROTOCOL[protocol], 'transport' => TRANSPORT[transport], 'hasResidentKey' => resident_key?, 'hasUserVerification' => user_verification?, 'isUserConsenting' => , 'isUserVerified' => user_verified?} end |