AuthenticatorAttestationResponse: attestationObject 属性
AuthenticatorAttestationResponse 接口的 attestationObject 属性返回一个 ArrayBuffer,其中包含新的公钥,以及使用设备制造时存储在身份验证器中的私钥对整个 attestationObject 的签名。
作为 CredentialsContainer.create() 调用的一部分,身份验证器将为该密钥对创建一个新的密钥对以及一个 attestationObject。生成此证明签名的私钥对应的公钥是众所周知的;但是,对于不同的生态系统(例如 Android 或 TPM 证明),存在各种众所周知的证明公钥链。
值
解码 CBOR 编码的 ArrayBuffer 后,生成的 JavaScript 对象将包含以下属性:
authData-
操作的 身份验证器数据。请注意,在
AuthenticatorAssertionResponse中,authenticatorData作为 JavaScript 对象中的一个属性公开(参见AuthenticatorAssertionResponse.authenticatorData),而在AuthenticatorAttestationResponse中,authenticatorData是 CBOR 映射中的一个属性。AuthenticatorAttestationResponse和AuthenticatorAssertionResponse都使用相同的AuthenticatorAssertionResponse.authenticatorData字段。在证明中使用时,它包含一个可选字段attestedCredentialData。在AuthenticatorAssertionResponse中使用时,不包含此字段。attestedCredentialData字段包含credentialId和credentialPublicKey。 fmt-
一个指示证明语句格式的文本字符串。WebAuthn 规范定义了多种格式;但是,其他规范也可以定义格式并在 IANA 注册表中注册。WebAuthn 定义的格式包括:
"packed""tpm""android-key""android-safetynet""fido-u2f""none"
attStmt-
一个由
"fmt"定义格式的证明语句。目前,请参阅 WebAuthn 规范了解每种格式的详细信息。
示例
有关详细示例,请参阅 创建公钥凭证。
规范
| 规范 |
|---|
| Web Authentication:访问公钥凭证的 API - 第 3 级 # dom-authenticatorattestationresponse-attestationobject |
浏览器兼容性
加载中…
另见
CredentialsContainer.create():用于创建带有加密challenge的声明的方法,该声明由身份验证器签名,签名包含在attStmt中,并使用指定的attestation传输选项。