TsgcWSAPIServer_WebAuthn › Events › OnWebAuthnHTTPResponse
Wordt geactiveerd nadat de server de HTTP-respons voor een WebAuthn-eindpunt heeft opgebouwd maar voordat deze wordt verzonden; nuttig voor het controleren of aanvullen van de uitgaande payload en headers.
property OnWebAuthnHTTPResponse: TsgcWebAuthnOnHTTPResponse;
// TsgcWebAuthnOnHTTPResponse = procedure(Sender: TObject; aMethod: TsgcWebAuthnHTTPRequestMethod; const aRequest: TsgcHTTPRequest; const aResponse: TsgcHTTPResponse) of object
—
Aanvulling op OnWebAuthnHTTPRequest. Geactiveerd vlak voordat het antwoord de server verlaat met het definitieve aResponse (statuscode, kopteksten en body) gekoppeld aan het originele aRequest en de aMethod die het eindpunt identificeert. Typisch gebruik: toegangslogging, metrics, aangepaste beveiligingskopteksten toevoegen of het antwoord wegschrijven naar een auditspoor.
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;