AuthenticatorAssertionResponse
AuthenticatorAssertionResponse 介面是 Web Authentication API 的一部分,它包含特定 WebAuthn 憑據私鑰生成的數字簽名。依賴方伺服器可以透過驗證此簽名來驗證使用者身份,例如在使用者登入時。
AuthenticatorAssertionResponse 物件例項可在成功呼叫 navigator.credentials.get() 返回的 PublicKeyCredential 物件的 response 屬性中找到。
此介面繼承自 AuthenticatorResponse。
注意: 此介面僅限於頂級上下文。在 <iframe> 元素內部使用將不會產生任何效果。
例項屬性
也繼承了其父介面 AuthenticatorResponse 的屬性。
AuthenticatorAssertionResponse.authenticatorData只讀-
一個
ArrayBuffer,包含來自身份驗證器(authenticator)的資訊,例如 Relying Party ID Hash (rpIdHash)、簽名計數器、使用者存在性測試和使用者驗證標誌,以及身份驗證器處理的任何擴充套件。 AuthenticatorResponse.clientDataJSON只讀-
包含從瀏覽器傳遞給身份驗證器以使用此憑據進行身份驗證的(即呼叫具有
publicKey選項的CredentialsContainer.get()時)資料的 JSON 相容序列化。這些資料包含來自傳遞給get()呼叫的選項中的一些資訊,以及一些由瀏覽器控制的資訊。 AuthenticatorAssertionResponse.signature只讀-
對
AuthenticatorAssertionResponse.authenticatorData和AuthenticatorResponse.clientDataJSON的斷言簽名。斷言簽名是使用在初始navigator.credentials.create()呼叫期間建立的金鑰對的私鑰生成的,並使用同一金鑰對的公鑰進行驗證。 AuthenticatorAssertionResponse.userHandle只讀-
一個
ArrayBuffer,包含一個不透明的使用者識別符號,該識別符號在傳遞給初始navigator.credentials.create()呼叫的選項中指定為user.id。
例項方法
無。
示例
有關詳細示例,請參閱檢索公鑰憑據。
規範
| 規範 |
|---|
| Web Authentication:訪問公鑰憑證的 API - 第 3 級 # iface-authenticatorassertionresponse |
瀏覽器相容性
載入中…
另見
AuthenticatorAttestationResponse:建立新憑據時響應的介面型別AuthenticatorResponse:父介面