AuthenticatorAttestationResponse: getAuthenticatorData() 方法
AuthenticatorAttestationResponse 接口的 getAuthenticatorData() 方法返回一个 ArrayBuffer,其中包含 AuthenticatorAttestationResponse.attestationObject 属性中的身份验证器数据。
这是一个方便函数,用于轻松访问身份验证器数据,而无需编写额外的解析代码从 attestationObject 中提取它。
语法
js
getAuthenticatorData()
参数
无。
返回值
一个 ArrayBuffer,其 ArrayBuffer.byteLength 至少为 37 字节,其中包含 身份验证器数据 中解释的数据结构。
这将等同于 AuthenticatorAttestationResponse.attestationObject 属性中包含的身份验证器数据。
示例
有关详细示例,请参阅 创建公钥凭证。
规范
| 规范 |
|---|
| Web Authentication:访问公钥凭证的 API - 第 3 级 # dom-authenticatorattestationresponse-getauthenticatordata |
浏览器兼容性
加载中…