WebAuthn

This domain allows configuring virtual authenticators to test the WebAuthn API.

This CDP domain is experimental.

Types

Generally, you do not need to instantiate CDP types yourself. Instead, the API creates objects for you as return values from commands, and then you can use those objects as arguments to other commands.

class cdp.web_authn.AuthenticatorId
class cdp.web_authn.AuthenticatorProtocol

An enumeration.

CTAP2 = 'ctap2'
U2F = 'u2f'
class cdp.web_authn.AuthenticatorTransport

An enumeration.

BLE = 'ble'
CABLE = 'cable'
INTERNAL = 'internal'
NFC = 'nfc'
USB = 'usb'
class cdp.web_authn.VirtualAuthenticatorOptions(protocol, transport, has_resident_key, has_user_verification, automatic_presence_simulation=None)
automatic_presence_simulation = None

If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.

class cdp.web_authn.Credential(credential_id, rp_id_hash, private_key, sign_count)
private_key = None

The private key in PKCS#8 format.

rp_id_hash = None

SHA-256 hash of the Relying Party ID the credential is scoped to. Must be 32 bytes long. See https://w3c.github.io/webauthn/#rpidhash

sign_count = None

Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter

Commands

Each command is a generator function. The return type Generator[x, y, z] indicates that the generator yields arguments of type x, it must be resumed with an argument of type y, and it returns type z. In this library, types x and y are the same for all commands, and z is the return type you should pay attention to. For more information, see Getting Started: Commands.

cdp.web_authn.add_credential(authenticator_id, credential)

Adds the credential to the specified authenticator.

Parameters:
Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

cdp.web_authn.add_virtual_authenticator(options)

Creates and adds a virtual authenticator.

Parameters:options (VirtualAuthenticatorOptions) –
Return type:Generator[Dict[str, Any], Dict[str, Any], AuthenticatorId]
Returns:
cdp.web_authn.clear_credentials(authenticator_id)

Clears all the credentials from the specified device.

Parameters:authenticator_id (AuthenticatorId) –
Return type:Generator[Dict[str, Any], Dict[str, Any], None]
cdp.web_authn.disable()

Disable the WebAuthn domain.

Return type:Generator[Dict[str, Any], Dict[str, Any], None]
cdp.web_authn.enable()

Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.

Return type:Generator[Dict[str, Any], Dict[str, Any], None]
cdp.web_authn.get_credentials(authenticator_id)

Returns all the credentials stored in the given virtual authenticator.

Parameters:authenticator_id (AuthenticatorId) –
Return type:Generator[Dict[str, Any], Dict[str, Any], List[Credential]]
Returns:
cdp.web_authn.remove_virtual_authenticator(authenticator_id)

Removes the given authenticator.

Parameters:authenticator_id (AuthenticatorId) –
Return type:Generator[Dict[str, Any], Dict[str, Any], None]
cdp.web_authn.set_user_verified(authenticator_id, is_user_verified)

Sets whether User Verification succeeds or fails for an authenticator. The default is true.

Parameters:
Return type:

Generator[Dict[str, Any], Dict[str, Any], None]

Events

There are no events in this module.