TsgcWSAPIServer_WebAuthnEventos › OnWebAuthnAuthenticationOptionsResponse

OnWebAuthnAuthenticationOptionsResponse Evento

Disparado depois que o servidor construiu a resposta PublicKeyCredentialRequestOptions para /authenticate/begin; permite que a aplicação inspecione ou persista o challenge gerado.

Sintaxe

property OnWebAuthnAuthenticationOptionsResponse: TsgcWebAuthnOnAuthenticationOptionsResponse;
// TsgcWebAuthnOnAuthenticationOptionsResponse = procedure(Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationOptions_Request; const aResponse: TsgcWebAuthn_AuthenticationOptions_Response) of object

Valor Padrão

Observações

Complemento de OnWebAuthnAuthenticationOptionsRequest. Dispara depois que o servidor construiu o payload completo de PublicKeyCredentialRequestOptions (challenge, RP id, user verification, allowCredentials com transports, timeout). Use-o para persistir o challenge em um armazenamento compartilhado em implantações em cluster, para auditar as opções emitidas ou para expor métricas antes de a resposta ser serializada ao cliente.

Exemplo

procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnAuthenticationOptionsResponse(
  Sender: TObject; const aRequest: TsgcWebAuthn_AuthenticationOptions_Request;
  const aResponse: TsgcWebAuthn_AuthenticationOptions_Response);
begin
  SaveChallenge(aRequest.User.Name, aResponse.Challenge);
end;

Voltar para Eventos