TsgcWSAPIServer_WebAuthnEventos › OnWebAuthnAuthenticationOptionsResponse

OnWebAuthnAuthenticationOptionsResponse Evento

Se activa después de que el servidor ha construido la respuesta PublicKeyCredentialRequestOptions para /authenticate/begin; permite a la aplicación inspeccionar o persistir el desafío generado.

Sintaxis

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

Valor Predeterminado

Observaciones

Complemento de OnWebAuthnAuthenticationOptionsRequest. Se activa después de que el servidor ha construido el payload completo PublicKeyCredentialRequestOptions (desafío, id de RP, verificación de usuario, allowCredentials con transportes, tiempo de espera). Úselo para persistir el desafío en un almacén compartido en implementaciones en clúster, auditar las opciones emitidas o exponer métricas antes de que la respuesta se serialice al cliente.

Ejemplo

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

Volver a Eventos