TsgcWSAPIServer_WebAuthn메서드 › DoProcessHTTP

DoProcessHTTP 메서드

HTTP 파이프라인의 진입점입니다. WebAuthn 등록, 인증 및 권한 부여 요청을 디스패치합니다.

구문

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

Parameters

NameType설명
aConnectionconst TsgcWSConnection요청을 받은 활성 HTTP/WebSocket 연결입니다.
aHeadersconst TStringList호스트 서버에서 전달된 원시 HTTP 요청 헤더(요청 라인 포함)입니다.

반환 값

요청이 WebAuthn 엔드포인트와 일치하여 완전히 처리된 경우 True. 요청이 WebAuthn에 대한 것이 아니어서 호출자가 처리해야 하는 경우 False. (Boolean)

설명

일반적으로 호스트 서버 OnCommandGet/OnCommandPost(또는 등가 HTTP API 이벤트)에서 연결됩니다. 메서드는 IsWebAuthnRequest를 통해 요청이 WebAuthn 엔드포인트를 대상으로 하는지 확인하고, 그렇다면 내부 request/response 객체를 빌드하고 등록 또는 인증 흐름을 디스패치합니다.

예제

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;

메서드로 돌아가기