TsgcWSAPIServer_WebAuthn › 方法 › DoProcessHTTP
HTTP 管道的入口点;调度 WebAuthn 注册、身份验证和授权请求。
function DoProcessHTTP(const aConnection: TsgcWSConnection; const aHeaders: TStringList): Boolean;
| 名称 | 类型 | 描述 |
|---|---|---|
aConnection | const TsgcWSConnection | 接收请求的活动 HTTP/WebSocket 连接。 |
aHeaders | const TStringList | 从主机服务器转发的原始 HTTP 请求标头(包括请求行)。 |
当请求匹配到 WebAuthn 端点且已完全处理时返回 True;当请求不针对 WebAuthn 且需由调用方处理时返回 False。(Boolean)
通常从主机服务器的 OnCommandGet/OnCommandPost(或等效的 HTTP API 事件)连接。该方法通过 IsWebAuthnRequest 检查请求是否针对 WebAuthn 端点,如果是,则构建内部请求/响应对象并分发注册或身份验证流程。
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;