Class: Selenium::DevTools::V85::WebAuthn

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/devtools/v85/web_authn.rb

Instance Method Summary collapse

Constructor Details

#initialize(devtools) ⇒ WebAuthn

Returns a new instance of WebAuthn.



26
27
28
# File 'lib/selenium/devtools/v85/web_authn.rb', line 26

def initialize(devtools)
  @devtools = devtools
end

Instance Method Details

#add_credential(authenticator_id:, credential:) ⇒ Object



53
54
55
56
57
# File 'lib/selenium/devtools/v85/web_authn.rb', line 53

def add_credential(authenticator_id:, credential:)
  @devtools.send_cmd('WebAuthn.addCredential',
                     authenticatorId: authenticator_id,
                     credential: credential)
end

#add_virtual_authenticator(options:) ⇒ Object



43
44
45
46
# File 'lib/selenium/devtools/v85/web_authn.rb', line 43

def add_virtual_authenticator(options:)
  @devtools.send_cmd('WebAuthn.addVirtualAuthenticator',
                     options: options)
end

#clear_credentials(authenticator_id:) ⇒ Object



76
77
78
79
# File 'lib/selenium/devtools/v85/web_authn.rb', line 76

def clear_credentials(authenticator_id:)
  @devtools.send_cmd('WebAuthn.clearCredentials',
                     authenticatorId: authenticator_id)
end

#disableObject



39
40
41
# File 'lib/selenium/devtools/v85/web_authn.rb', line 39

def disable
  @devtools.send_cmd('WebAuthn.disable')
end

#enableObject



35
36
37
# File 'lib/selenium/devtools/v85/web_authn.rb', line 35

def enable
  @devtools.send_cmd('WebAuthn.enable')
end

#get_credential(authenticator_id:, credential_id:) ⇒ Object



59
60
61
62
63
# File 'lib/selenium/devtools/v85/web_authn.rb', line 59

def get_credential(authenticator_id:, credential_id:)
  @devtools.send_cmd('WebAuthn.getCredential',
                     authenticatorId: authenticator_id,
                     credentialId: credential_id)
end

#get_credentials(authenticator_id:) ⇒ Object



65
66
67
68
# File 'lib/selenium/devtools/v85/web_authn.rb', line 65

def get_credentials(authenticator_id:)
  @devtools.send_cmd('WebAuthn.getCredentials',
                     authenticatorId: authenticator_id)
end

#on(event, &block) ⇒ Object



30
31
32
33
# File 'lib/selenium/devtools/v85/web_authn.rb', line 30

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



70
71
72
73
74
# File 'lib/selenium/devtools/v85/web_authn.rb', line 70

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



48
49
50
51
# File 'lib/selenium/devtools/v85/web_authn.rb', line 48

def remove_virtual_authenticator(authenticator_id:)
  @devtools.send_cmd('WebAuthn.removeVirtualAuthenticator',
                     authenticatorId: authenticator_id)
end

#set_user_verified(authenticator_id:, is_user_verified:) ⇒ Object



81
82
83
84
85
# File 'lib/selenium/devtools/v85/web_authn.rb', line 81

def set_user_verified(authenticator_id:, is_user_verified:)
  @devtools.send_cmd('WebAuthn.setUserVerified',
                     authenticatorId: authenticator_id,
                     isUserVerified: is_user_verified)
end