Interface WebAuthn


public interface WebAuthn
This domain allows configuring virtual authenticators to test the WebAuthn API.
  • Method Details

    • addCredential

      void addCredential(String authenticatorId, Credential credential)
      Adds the credential to the specified authenticator.
    • addVirtualAuthenticator

      String addVirtualAuthenticator(VirtualAuthenticatorOptions options)
      Creates and adds a virtual authenticator.
    • clearCredentials

      void clearCredentials(String authenticatorId)
      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

      void enable(Boolean enableUI)
      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

      Credential getCredential(String authenticatorId, String credentialId)
      Returns a single credential stored in the given virtual authenticator that matches the credential ID.
    • getCredentials

      List<Credential> getCredentials(String authenticatorId)
      Returns all the credentials stored in the given virtual authenticator.
    • removeCredential

      void removeCredential(String authenticatorId, String credentialId)
      Removes a credential from the authenticator.
    • removeVirtualAuthenticator

      void removeVirtualAuthenticator(String authenticatorId)
      Removes the given authenticator.
    • setAutomaticPresenceSimulation

      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. The default is true.
    • setUserVerified

      void setUserVerified(String authenticatorId, Boolean isUserVerified)
      Sets whether User Verification succeeds or fails for an authenticator. The default is true.