TsgcWSAPIServer_WebAuthnMetodi › DoProcessHTTP

DoProcessHTTP Metodo

Punto di ingresso della pipeline HTTP; smista le richieste di registrazione, autenticazione e autorizzazione WebAuthn.

Sintassi

function DoProcessHTTP(const aConnection: TsgcWSConnection; const aHeaders: TStringList): Boolean;

Parametri

NomeTipoDescrizione
aConnectionconst TsgcWSConnectionConnessione HTTP/WebSocket attiva che ha ricevuto la richiesta.
aHeadersconst TStringListHeader della richiesta HTTP non elaborati (inclusa la riga di richiesta) inoltrati dal server host.

Valore restituito

True quando la richiesta ha corrisposto a un endpoint WebAuthn ed è stata completamente elaborata; False quando la richiesta non riguarda WebAuthn e deve essere gestita dal chiamante. (Boolean)

Note

Normalmente collegato all'evento OnCommandGet/OnCommandPost del server host (o all'evento API HTTP equivalente). Il metodo verifica se la richiesta ha come target un endpoint WebAuthn tramite IsWebAuthnRequest e, in caso affermativo, costruisce gli oggetti interni di richiesta/risposta e avvia il flusso di registrazione o autenticazione.

Esempio

procedure TForm1.sgcWebSocketServer1CommandGet(aConnection: TsgcWSConnection;
  aRequestInfo: TIdHTTPRequestInfo; aResponseInfo: TIdHTTPResponseInfo);
begin
  if sgcWSAPIServer_WebAuthn1.DoProcessHTTP(aConnection, aRequestInfo.RawHeaders) then
    Exit;
  // ... fall through to your own HTTP handling
end;

Torna ai Metodi