此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

AuthenticatorAssertionResponse:signature 属性

基线 广泛可用

自 2021年9月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

安全上下文: 此特性仅在一些支持的浏览器安全上下文(HTTPS)中可用。

AuthenticatorAssertionResponse 接口的只读属性 signature 返回一个 ArrayBuffer 对象,表示认证器对 AuthenticatorAssertionResponse.authenticatorData 和客户端数据(AuthenticatorAssertionResponse.clientDataJSON)的 SHA-256 散列值的签名。

此签名将作为响应的一部分发送到服务器进行验证。它能证明认证器确实拥有用于生成凭据的私钥。

ArrayBuffer 对象,表示认证器(使用其私钥)对 AuthenticatorAssertionResponse.authenticatorData 数据和由客户端提供的 SHA-256 散列值(挑战、来源等,可通过 AuthenticatorAssertionResponse.clientDataJSON 获取)的签名。

示例

参见检索公钥凭据以获取详细示例。

规范

规范
Web Authentication: An API for accessing Public Key Credentials - Level 3
# dom-authenticatorassertionresponse-signature

浏览器兼容性