Package io.webfolder.cdp.command
Interface WebAuthn
public interface WebAuthn
This domain allows configuring virtual authenticators to test the WebAuthn API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCredential
(String authenticatorId, Credential credential) Adds the credential to the specified authenticator.Creates and adds a virtual authenticator.void
clearCredentials
(String authenticatorId) Clears all the credentials from the specified device.void
disable()
Disable the WebAuthn domain.void
enable()
Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.void
Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.getCredential
(String authenticatorId, String credentialId) Returns a single credential stored in the given virtual authenticator that matches the credential ID.getCredentials
(String authenticatorId) Returns all the credentials stored in the given virtual authenticator.void
removeCredential
(String authenticatorId, String credentialId) Removes a credential from the authenticator.void
removeVirtualAuthenticator
(String authenticatorId) Removes the given authenticator.void
setAutomaticPresenceSimulation
(String authenticatorId, Boolean enabled) Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.void
setUserVerified
(String authenticatorId, Boolean isUserVerified) Sets whether User Verification succeeds or fails for an authenticator.
-
Method Details
-
addCredential
Adds the credential to the specified authenticator. -
addVirtualAuthenticator
Creates and adds a virtual authenticator. -
clearCredentials
Clears all the credentials from the specified device. -
disable
void disable()Disable the WebAuthn domain. -
enable
void enable()Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator. -
enable
Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.- Parameters:
enableUI
- Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.
-
getCredential
Returns a single credential stored in the given virtual authenticator that matches the credential ID. -
getCredentials
Returns all the credentials stored in the given virtual authenticator. -
removeCredential
Removes a credential from the authenticator. -
removeVirtualAuthenticator
Removes the given authenticator. -
setAutomaticPresenceSimulation
Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true. -
setUserVerified
Sets whether User Verification succeeds or fails for an authenticator. The default is true.
-