TsgcWSAPIServer_WebAuthn › 事件 › OnWebAuthnAuthenticationOptionsResponse
在服务器构建了 /authenticate/begin 的 PublicKeyCredentialRequestOptions 响应后触发;允许应用程序检查或持久化生成的挑战。
property OnWebAuthnAuthenticationOptionsResponse: TsgcWebAuthnOnAuthenticationOptionsResponse;
// TsgcWebAuthnOnAuthenticationOptionsResponse = procedure(Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationOptions_Request; const aResponse: TsgcWebAuthn_AuthenticationOptions_Response) of object
—
OnWebAuthnAuthenticationOptionsRequest 的配套事件。在服务器构建完整的 PublicKeyCredentialRequestOptions 负载(挑战值、RP ID、用户验证、含传输方式的 allowCredentials、超时)后触发。可用于在集群部署中将挑战值持久化到共享存储、审计发出的选项,或在响应序列化给客户端之前公开指标。
procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnAuthenticationOptionsResponse(
Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationOptions_Request;
const aResponse: TsgcWebAuthn_AuthenticationOptions_Response);
begin
SaveChallenge(aRequest.User.Name, aResponse.Challenge);
end;