Web authentication easy public key access
The getAuthenticatorData() method of the AuthenticatorAttestationResponse interface returns an ArrayBuffer containing the authenticator data contained within the AuthenticatorAttestationResponse.attestationObject property.
This is a convenience function, created to allow easy access to the authenticator data without having to write extra parsing code to extract it from the attestationObject.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 85 | 85 | 119 | 16 | 85 | 16 | |
| The getPublicKey() method of the AuthenticatorAttestationResponse interface returns an ArrayBuffer containing the DER SubjectPublicKeyInfo of the new credential (see Subject Public Key Info), or null if this is not available. | 85 | 85 | 119 | 16 | 85 | 16 |
| The getPublicKeyAlgorithm() method of the AuthenticatorAttestationResponse interface returns a number that is equal to a COSE Algorithm Identifier, representing the cryptographic algorithm used for the new credential. | 85 | 85 | 119 | 16 | 85 | 16 |
Syntax
getAuthenticatorData() Use cases
-
Using Web authentication easy public key access
The getAuthenticatorData() method of the AuthenticatorAttestationResponse interface returns an ArrayBuffer containing the authenticator data contained within the AuthenticatorAttestationResponse.
Cautions
- May not be supported in older browsers.
Implementation notes
- Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.