Skip to content

Authenticator

Utility functions for constructing and parsing authenticator data and client data JSON.

Functions

NameDescription
Authenticator.getAttestationObjectConstructs a CBOR-encoded attestation object for testing WebAuthn registration verification. Combines the authenticator data with an attestation statement.
Authenticator.getAuthenticatorDataGets the authenticator data which contains information about the processing of an authenticator request (ie. from Authentication.sign).
Authenticator.getClientDataJSONConstructs the Client Data in stringified JSON format which represents client data that was passed to credentials.get() or credentials.create().
Authenticator.getSignCountExtracts the signature counter from the authenticator data. The counter is a 4-byte big-endian unsigned integer at bytes 33–36.