TsgcWSAPIServer_WebAuthn › 方法 › ValidateAuthenticationOptions
解析认证者数据、客户端数据和签名,并对照存储的凭证对用户进行身份验证。
procedure ValidateAuthenticationOptions(const aPayload: string);
| 名称 | 类型 | 描述 |
|---|---|---|
aPayload | const string | 客户端 navigator.credentials.get() 调用返回的 JSON 有效载荷,包含凭证 id、authenticatorData、clientDataJSON 和签名。 |
执行完整的 WebAuthn 规范验证:挑战、来源和依赖方 ID 检查、用户在场/用户验证标志、签名计数器单调性以及使用存储凭据的公钥进行签名验证。成功时触发 OnWebAuthnAuthenticationSuccessful,失败时触发 OnWebAuthnAuthenticationError。仅在在内置 HTTP 端点之外驱动身份验证时手动调用此方法。
sgcWSAPIServer_WebAuthn1.ValidateAuthenticationOptions(vClientJSON);