AuthenticatorAssertionResponse:userHandle 属性
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2021年9月.
AuthenticatorAssertionResponse
接口的只读属性 userHandle
返回一个能为给定用户提供不透明标识符的 ArrayBuffer
对象。依赖方服务器可以使用这类标识符将用户账户与其对应的凭据和其他数据相关联。
此值在传递给原始的 navigator.credentials.create()
调用的选项中指定为 user.id
。
值
表示当前用户的标识符的 ArrayBuffer
对象。该标识符不应被人阅读。依赖方应确保传递到原始 create()
调用中的 user.id
不包含任何个人身份信息(例如用户名、电子邮件或电话号码)。
对于带有非空 allowCredentials
属性的 navigator.credentials.create()
调用,返回的 userHandle
可能为 null。
示例
参见检索公钥凭据以获取详细示例。
规范
Specification |
---|
Web Authentication: An API for accessing Public Key Credentials - Level 3> # dom-authenticatorassertionresponse-userhandle> |
浏览器兼容性
Loading…
参见
- 设置此属性值的
CredentialsContainer.create()