安全上下文
此特征只可用于
安全上下文
(HTTPS),在某些或所有
支持浏览器
.
authenticatorData
特性为
AuthenticatorAssertionResponse
interface returns an
ArrayBuffer
containing information from the authenticator such as the Relying Party ID Hash (rpIdHash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
var authnrData = authenticatorAssertionResponse.authenticatorData;
ArrayBuffer
that has a
ArrayBuffer.byteLength
of at least 37 bytes, containing the following fields:
var options = {
challenge: new Uint8Array(26), // will be another value, provided by the relying party server
timeout: 60000
};
navigator.credentials.get({ publickey: options })
.then(function (assertionPKCred) {
var authenticatorData = assertionPKCred.response.authenticatorData;
// Maybe try to convert the authenticatorData to see what's inside
// Send response and client extensions to the server so that it can
// go on with the authentication
}).catch(function (err) {
console.error(err);
});
| 规范 | 状态 | 注释 |
|---|---|---|
|
Web Authentication: An API for accessing Public Key Credentials Level 1
The definition of 'authenticatorData' in that specification. |
推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
authenticatorData
|
Chrome
67
|
Edge 18 |
Firefox
60
|
IE No | Opera No | Safari 13 | WebView Android 70 | Chrome Android 70 |
Firefox Android
60
|
Opera Android No | Safari iOS 13.3 | Samsung Internet Android No |
完整支持
不支持
见实现注意事项。
用户必须明确启用此特征。