Class: Selenium::DevTools::V130::WebAuthn
- Inherits:
-
Object
- Object
- Selenium::DevTools::V130::WebAuthn
- Defined in:
- lib/selenium/devtools/v130/web_authn.rb
Constant Summary collapse
- EVENTS =
{ credential_added: 'credentialAdded', credential_asserted: 'credentialAsserted', }.freeze
Instance Method Summary collapse
- #add_credential(authenticator_id:, credential:) ⇒ Object
- #add_virtual_authenticator(options:) ⇒ Object
- #clear_credentials(authenticator_id:) ⇒ Object
- #disable ⇒ Object
- #enable(enable_ui: nil) ⇒ Object
- #get_credential(authenticator_id:, credential_id:) ⇒ Object
- #get_credentials(authenticator_id:) ⇒ Object
-
#initialize(devtools) ⇒ WebAuthn
constructor
A new instance of WebAuthn.
- #on(event, &block) ⇒ Object
- #remove_credential(authenticator_id:, credential_id:) ⇒ Object
- #remove_virtual_authenticator(authenticator_id:) ⇒ Object
- #set_automatic_presence_simulation(authenticator_id:, enabled:) ⇒ Object
- #set_credential_properties(authenticator_id:, credential_id:, backup_eligibility: nil, backup_state: nil) ⇒ Object
- #set_response_override_bits(authenticator_id:, is_bogus_signature: nil, is_bad_uv: nil, is_bad_up: nil) ⇒ Object
- #set_user_verified(authenticator_id:, is_user_verified:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ WebAuthn
Returns a new instance of WebAuthn.
30 31 32 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 30 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#add_credential(authenticator_id:, credential:) ⇒ Object
66 67 68 69 70 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 66 def add_credential(authenticator_id:, credential:) @devtools.send_cmd('WebAuthn.addCredential', authenticatorId: authenticator_id, credential: credential) end |
#add_virtual_authenticator(options:) ⇒ Object
48 49 50 51 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 48 def add_virtual_authenticator(options:) @devtools.send_cmd('WebAuthn.addVirtualAuthenticator', options: ) end |
#clear_credentials(authenticator_id:) ⇒ Object
89 90 91 92 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 89 def clear_credentials(authenticator_id:) @devtools.send_cmd('WebAuthn.clearCredentials', authenticatorId: authenticator_id) end |
#disable ⇒ Object
44 45 46 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 44 def disable @devtools.send_cmd('WebAuthn.disable') end |
#enable(enable_ui: nil) ⇒ Object
39 40 41 42 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 39 def enable(enable_ui: nil) @devtools.send_cmd('WebAuthn.enable', enableUI: enable_ui) end |
#get_credential(authenticator_id:, credential_id:) ⇒ Object
72 73 74 75 76 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 72 def get_credential(authenticator_id:, credential_id:) @devtools.send_cmd('WebAuthn.getCredential', authenticatorId: authenticator_id, credentialId: credential_id) end |
#get_credentials(authenticator_id:) ⇒ Object
78 79 80 81 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 78 def get_credentials(authenticator_id:) @devtools.send_cmd('WebAuthn.getCredentials', authenticatorId: authenticator_id) end |
#on(event, &block) ⇒ Object
34 35 36 37 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 34 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["WebAuthn.#{event}"] << block end |
#remove_credential(authenticator_id:, credential_id:) ⇒ Object
83 84 85 86 87 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 83 def remove_credential(authenticator_id:, credential_id:) @devtools.send_cmd('WebAuthn.removeCredential', authenticatorId: authenticator_id, credentialId: credential_id) end |
#remove_virtual_authenticator(authenticator_id:) ⇒ Object
61 62 63 64 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 61 def remove_virtual_authenticator(authenticator_id:) @devtools.send_cmd('WebAuthn.removeVirtualAuthenticator', authenticatorId: authenticator_id) end |
#set_automatic_presence_simulation(authenticator_id:, enabled:) ⇒ Object
100 101 102 103 104 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 100 def set_automatic_presence_simulation(authenticator_id:, enabled:) @devtools.send_cmd('WebAuthn.setAutomaticPresenceSimulation', authenticatorId: authenticator_id, enabled: enabled) end |
#set_credential_properties(authenticator_id:, credential_id:, backup_eligibility: nil, backup_state: nil) ⇒ Object
106 107 108 109 110 111 112 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 106 def set_credential_properties(authenticator_id:, credential_id:, backup_eligibility: nil, backup_state: nil) @devtools.send_cmd('WebAuthn.setCredentialProperties', authenticatorId: authenticator_id, credentialId: credential_id, backupEligibility: backup_eligibility, backupState: backup_state) end |
#set_response_override_bits(authenticator_id:, is_bogus_signature: nil, is_bad_uv: nil, is_bad_up: nil) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 53 def set_response_override_bits(authenticator_id:, is_bogus_signature: nil, is_bad_uv: nil, is_bad_up: nil) @devtools.send_cmd('WebAuthn.setResponseOverrideBits', authenticatorId: authenticator_id, isBogusSignature: is_bogus_signature, isBadUV: is_bad_uv, isBadUP: is_bad_up) end |
#set_user_verified(authenticator_id:, is_user_verified:) ⇒ Object
94 95 96 97 98 |
# File 'lib/selenium/devtools/v130/web_authn.rb', line 94 def set_user_verified(authenticator_id:, is_user_verified:) @devtools.send_cmd('WebAuthn.setUserVerified', authenticatorId: authenticator_id, isUserVerified: is_user_verified) end |