TsgcWSAPIServer_WebAuthnEvents › OnWebAuthnAuthenticationSuccessful

OnWebAuthnAuthenticationSuccessful Zdarzenie

Wywoływane na końcu /authenticate/verify, gdy sygnatura asercji jest prawidłowa; aplikacja powinna zaktualizować licznik podpisów i ustanowić sesję.

Składnia

property OnWebAuthnAuthenticationSuccessful: TsgcWebAuthnOnAuthenticationSuccessful;
// TsgcWebAuthnOnAuthenticationSuccessful = procedure(Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationVerify_Request; const aAuthentication: TsgcWebAuthn_Authentication; var Accept: Boolean) of object

Wartość domyślna

Uwagi

Ostateczne wywołanie zwrotne udanej ceremonii uwierzytelniania. aRequest to ładunek weryfikacyjny wysłany przez klienta; aAuthentication zawiera zweryfikowany identyfikator użytkownika, pasujący rekord poświadczenia i nowy licznik podpisów zgłoszony przez urządzenie uwierzytelniające. Należy utrwalić zaktualizowany licznik podpisów i wszelkie flagi kopii zapasowej/użycia, a następnie ustawić Accept na true, aby serwer mógł wystawić token sesji. Ustawienie Accept na false przerywa proces w ostatnim momencie, na przykład gdy silnik ryzyka odrzuci logowanie, w takim przypadku klient otrzyma błąd uwierzytelnienia zamiast odpowiedzi o sukcesie.

Przykład

procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnAuthenticationSuccessful(
  Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationVerify_Request;
  const aAuthentication: TsgcWebAuthn_Authentication; var Accept: Boolean);
begin
  UpdateSignCounter(aAuthentication.CredentialId, aAuthentication.SignCount);
  Accept := True;
end;

Powrót do Zdarzeń