selenium.webdriver.common.virtual_authenticator

Functions

required_chromium_based_browser(func)

A decorator to ensure that the client used is a chromium based browser.

required_virtual_authenticator(func)

A decorator to ensure that the function is called with a virtual authenticator.

Classes

Credential(credential_id, ...)

Constructor.

Protocol(value)

Protocol to communicate with the authenticator.

Transport(value)

Transport method to communicate with the authenticator.

VirtualAuthenticatorOptions([protocol, ...])

Constructor.

class selenium.webdriver.common.virtual_authenticator.Protocol(value)[source]

Protocol to communicate with the authenticator.

CTAP2: str = 'ctap2'
U2F: str = 'ctap1/u2f'
class selenium.webdriver.common.virtual_authenticator.Transport(value)[source]

Transport method to communicate with the authenticator.

BLE: str = 'ble'
USB: str = 'usb'
NFC: str = 'nfc'
INTERNAL: str = 'internal'
class selenium.webdriver.common.virtual_authenticator.VirtualAuthenticatorOptions(protocol: str = Protocol.CTAP2, transport: str = Transport.USB, has_resident_key: bool = False, has_user_verification: bool = False, is_user_consenting: bool = True, is_user_verified: bool = False)[source]

Constructor.

Initialize VirtualAuthenticatorOptions object.

class Protocol(value)

Protocol to communicate with the authenticator.

CTAP2: str = 'ctap2'
U2F: str = 'ctap1/u2f'
class Transport(value)

Transport method to communicate with the authenticator.

BLE: str = 'ble'
USB: str = 'usb'
NFC: str = 'nfc'
INTERNAL: str = 'internal'
to_dict() Dict[str, str | bool][source]
class selenium.webdriver.common.virtual_authenticator.Credential(credential_id: bytes, is_resident_credential: bool, rp_id: str, user_handle: bytes | None, private_key: bytes, sign_count: int)[source]

Constructor. A credential stored in a virtual authenticator. https://w3c.github.io/webauthn/#credential-parameters.

Args:
  • credential_id (bytes): Unique base64 encoded string.

is_resident_credential (bool): Whether the credential is client-side discoverable. rp_id (str): Relying party identifier. user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string. Can be None. private_key (bytes): Base64 encoded PKCS#8 private key. sign_count (int): intital value for a signature counter.

property id: str
property is_resident_credential: bool
property rp_id: str
property user_handle: str | None
property private_key: str
property sign_count: int
classmethod create_non_resident_credential(id: bytes, rp_id: str, private_key: bytes, sign_count: int) Credential[source]

Creates a non-resident (i.e. stateless) credential.

Args:
  • id (bytes): Unique base64 encoded string.

  • rp_id (str): Relying party identifier.

  • private_key (bytes): Base64 encoded PKCS

  • sign_count (int): intital value for a signature counter.

Returns:
  • Credential: A non-resident credential.

classmethod create_resident_credential(id: bytes, rp_id: str, user_handle: bytes | None, private_key: bytes, sign_count: int) Credential[source]

Creates a resident (i.e. stateful) credential.

Args:
  • id (bytes): Unique base64 encoded string.

  • rp_id (str): Relying party identifier.

  • user_handle (bytes): userHandle associated to the credential. Must be Base64 encoded string.

  • private_key (bytes): Base64 encoded PKCS

  • sign_count (int): intital value for a signature counter.

Returns:

  • Credential: A resident credential.

to_dict() Dict[str, Any][source]
classmethod from_dict(data: Dict[str, Any]) Credential[source]
selenium.webdriver.common.virtual_authenticator.required_chromium_based_browser(func)[source]

A decorator to ensure that the client used is a chromium based browser.

selenium.webdriver.common.virtual_authenticator.required_virtual_authenticator(func)[source]

A decorator to ensure that the function is called with a virtual authenticator.