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:父接口