TsgcWSAPIServer_WebAuthn › イベント › 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;