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傳輸選項。