TsgcWSAPIServer_WebAuthn › Events › OnWebAuthnHTTPResponse
Se activa después de que el servidor ha construido la respuesta HTTP para un endpoint WebAuthn pero antes de que sea enviada; útil para auditar o decorar el payload y los encabezados salientes.
property OnWebAuthnHTTPResponse: TsgcWebAuthnOnHTTPResponse;
// TsgcWebAuthnOnHTTPResponse = procedure(Sender: TObject; aMethod: TsgcWebAuthnHTTPRequestMethod; const aRequest: TsgcHTTPRequest; const aResponse: TsgcHTTPResponse) of object
—
Complemento de OnWebAuthnHTTPRequest. Se dispara justo antes de que la respuesta salga del servidor con el aResponse final (código de estado, cabeceras y cuerpo), emparejado con el aRequest original y el aMethod que identifica el endpoint. Los usos típicos son el registro de accesos, métricas, agregar cabeceras de seguridad personalizadas o escribir la respuesta en un registro de auditoría.
procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnHTTPResponse(Sender: TObject;
aMethod: TsgcWebAuthnHTTPRequestMethod; const aRequest: TsgcHTTPRequest;
const aResponse: TsgcHTTPResponse);
begin
Memo1.Lines.Add(Format('WebAuthn %d %s', [aResponse.ResponseCode, aRequest.URI]));
end;