AuthenticatorAttestationResponse: getAuthenticatorData() method
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Web Authentication API")}}{{securecontext_header}}
The **getAuthenticatorData()** method of the {{domxref("AuthenticatorAttestationResponse")}} interface returns an {{jsxref("ArrayBuffer")}} containing the authenticator data contained within the {{domxref("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.
Syntax
getAuthenticatorData()Parameters
None.
Return value
An {{jsxref("ArrayBuffer")}} with a {{jsxref("ArrayBuffer.byteLength", "byteLength")}} of at least 37 bytes, which contains the data structure explained in Authenticator data.
This will be equivalent to the authenticator data contained within the {{domxref("AuthenticatorAttestationResponse.attestationObject")}} property.
Examples
See Creating a public key credential for a detailed example.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}