Skip to main content

cdp_driver/methods/
web_authn.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! This domain allows configuring virtual authenticators to test the WebAuthn
5//! API.
6//!
7//! Method names for the `WebAuthn` domain, for use with
8//! [`CdpClient::call`](crate::CdpClient::call).
9//!
10//! This domain is experimental and may change without notice.
11
12/// Enable the WebAuthn domain and start intercepting credential storage and
13/// retrieval with a virtual authenticator.
14///
15/// Parameters:
16/// - `enableUI`: boolean (optional)
17pub const ENABLE: &str = "WebAuthn.enable";
18
19/// Disable the WebAuthn domain.
20pub const DISABLE: &str = "WebAuthn.disable";
21
22/// Creates and adds a virtual authenticator.
23///
24/// Parameters:
25/// - `options`: VirtualAuthenticatorOptions
26///
27/// Returns: `authenticatorId`
28pub const ADD_VIRTUAL_AUTHENTICATOR: &str = "WebAuthn.addVirtualAuthenticator";
29
30/// Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are
31/// not present.
32///
33/// Parameters:
34/// - `authenticatorId`: AuthenticatorId
35/// - `isBogusSignature`: boolean (optional)
36/// - `isBadUV`: boolean (optional)
37/// - `isBadUP`: boolean (optional)
38pub const SET_RESPONSE_OVERRIDE_BITS: &str = "WebAuthn.setResponseOverrideBits";
39
40/// Removes the given authenticator.
41///
42/// Parameters:
43/// - `authenticatorId`: AuthenticatorId
44pub const REMOVE_VIRTUAL_AUTHENTICATOR: &str = "WebAuthn.removeVirtualAuthenticator";
45
46/// Adds the credential to the specified authenticator.
47///
48/// Parameters:
49/// - `authenticatorId`: AuthenticatorId
50/// - `credential`: Credential
51pub const ADD_CREDENTIAL: &str = "WebAuthn.addCredential";
52
53/// Returns a single credential stored in the given virtual authenticator that
54/// matches the credential ID.
55///
56/// Parameters:
57/// - `authenticatorId`: AuthenticatorId
58/// - `credentialId`: string
59///
60/// Returns: `credential`
61pub const GET_CREDENTIAL: &str = "WebAuthn.getCredential";
62
63/// Returns all the credentials stored in the given virtual authenticator.
64///
65/// Parameters:
66/// - `authenticatorId`: AuthenticatorId
67///
68/// Returns: `credentials`
69pub const GET_CREDENTIALS: &str = "WebAuthn.getCredentials";
70
71/// Removes a credential from the authenticator.
72///
73/// Parameters:
74/// - `authenticatorId`: AuthenticatorId
75/// - `credentialId`: string
76pub const REMOVE_CREDENTIAL: &str = "WebAuthn.removeCredential";
77
78/// Clears all the credentials from the specified device.
79///
80/// Parameters:
81/// - `authenticatorId`: AuthenticatorId
82pub const CLEAR_CREDENTIALS: &str = "WebAuthn.clearCredentials";
83
84/// Sets whether User Verification succeeds or fails for an authenticator. The
85/// default is true.
86///
87/// Parameters:
88/// - `authenticatorId`: AuthenticatorId
89/// - `isUserVerified`: boolean
90pub const SET_USER_VERIFIED: &str = "WebAuthn.setUserVerified";
91
92/// Sets whether tests of user presence will succeed immediately (if true) or
93/// fail to resolve (if false) for an authenticator. The default is true.
94///
95/// Parameters:
96/// - `authenticatorId`: AuthenticatorId
97/// - `enabled`: boolean
98pub const SET_AUTOMATIC_PRESENCE_SIMULATION: &str = "WebAuthn.setAutomaticPresenceSimulation";
99
100/// Allows setting credential properties.
101/// <https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties>
102///
103/// Parameters:
104/// - `authenticatorId`: AuthenticatorId
105/// - `credentialId`: string
106/// - `backupEligibility`: boolean (optional)
107/// - `backupState`: boolean (optional)
108/// - `activeCmtgKeyIndex`: integer (optional)
109/// - `generateCmtgKeyOnNextOperation`: boolean (optional)
110/// - `signCount`: number (optional)
111pub const SET_CREDENTIAL_PROPERTIES: &str = "WebAuthn.setCredentialProperties";