TsgcWSAPIServer_WebAuthn事件 › OnWebAuthnRegistrationSuccessful

OnWebAuthnRegistrationSuccessful 事件

在 /register/verify 结束时,当证明被接受后触发;应用程序必须在此处为用户持久化新的凭据记录。

语法

property OnWebAuthnRegistrationSuccessful: TsgcWebAuthnOnRegistrationSuccessful;
// TsgcWebAuthnOnRegistrationSuccessful = procedure(Sender: TObject; const aRegistration: TsgcWebAuthn_Registration; const aCredentialRecord: TsgcWebAuthn_CredentialRecord; var Accept: Boolean) of object

默认值

备注

成功注册仪式的最终钩子。aRegistration 保存原始用户信息和已验证的证明;aCredentialRecord 包含服务器端凭据(凭据 ID、公钥、签名计数、传输方式、备份标志、AAGUID),必须以用户为键存储。将 Accept 设置为 false 可在最后时刻中止仪式,例如当您的存储拒绝插入时,服务器将向客户端返回错误响应而非成功响应。

示例

procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnRegistrationSuccessful(
  Sender: TObject; const aRegistration: TsgcWebAuthn_Registration;
  const aCredentialRecord: TsgcWebAuthn_CredentialRecord; var Accept: Boolean);
begin
  Accept := SaveCredential(aRegistration.User.Name, aCredentialRecord);
end;

返回事件