- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前可以使用以下方法创建 publicKeyCredentials:
navigator.credentials.create({
challenge: Uint8Array.from('CCCCCCCCCCCCCCCCCCCCCC', c => c.charCodeAt(0)),
rp: {
id,
name: 'rpName'
},
user: {
id: Uint8Array.from('userHandleId', c => c.charCodeAt(0)),
name: 'userName',
displayName: 'DisplayName'
},
pubKeyCredParams: [{alg: -7, type: 'public-key'}],
authenticatorSelection: {
userVerification: 'discouraged',
authenticatorAttachment: 'platform',
requireResidentKey: true, // don't seem to do anything with android-saftynet
residentKey: 'required' // don't seem to do anything with android-saftynet
},
timeout: 60000,
attestation: 'direct'
})
然后使用以下命令检索凭证:
navigator.credentials.get({
publicKey: {
challenge: generateChallenge(),
allowCredentials: [{
id: decodeArray(id),
type: 'public-key'
}],
timeout: 60000,
transport: ['internal'],
userVerification: 'discouraged'
},
})
此流程适用于我所有的苹果设备,但是,在 Android 上,凭据的“fmt”是“android-saftynet”,它似乎不支持 userHandles。
最佳答案
证明(具有各种格式,例如 android-safetynet
)和无用户名流是两个完全独立的概念。您可以在没有证明的情况下拥有无用户名流(格式 none
)。
Attestation 允许您验证身份验证器本身 - 身份验证器是否实际上是 iPhone、Yubikey 或(非根)Android 设备,以及 key Material 的存储方式或指纹扫描仪的误报率等属性。更多详情见https://fidoalliance.org/fido-technotes-the-truth-about-attestation/和 https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651
在 WebAuthn 级别 1 中,即使用户代理不支持无用户名注册(使用 requireResidentKey: true
),也允许继续进行(参见 authenticatorMakeCredential
operation step 20)。在第 2 级中,发生了一些变化:
requireResidentKey
bool 值更改为 residentKey
枚举,但仍然支持向后兼容,authenticatorMakeCredential
操作已更改为在 step 4 中返回错误如果不支持客户端可发现凭据,credProps
extension添加以确定是否创建了客户端可发现凭据,无论是应 RP 的请求还是因为身份验证器选择(step 7.4)。 allowCredentials
数组)。这是一个
known issue一阵子。
关于android - PublicKeyCredentials Webauthn "internal"身份验证在 Android (Android Saftynet) 上缺少 userHandle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70773179/
我目前可以使用以下方法创建 publicKeyCredentials: navigator.credentials.create({ challenge: Uint8Array.from(
我是一名优秀的程序员,十分优秀!