TsgcWSAPIServer_WebAuthn方法 › IsWebAuthnRequest

IsWebAuthnRequest 方法

当传入的 URL 路径匹配已配置的 WebAuthn 端点之一时返回 True。

语法

function IsWebAuthnRequest(const aHeaders: TStringList): Boolean;

参数

名称类型描述
aHeadersconst TStringList原始 HTTP 请求标头(包括请求行),从中提取 URL 路径。

返回值

当请求 URL 指向 EndpointsOptions 中配置的路径之一(注册、验证、verify、webauthn.js 等)时为 True;否则为 False。(Boolean

备注

当主机服务器必须决定是否将请求委托给 WebAuthn 组件或保留其自己的处理时很有用。DoProcessHTTP 在启动注册或身份验证流程之前在内部调用此方法。

示例

if sgcWSAPIServer_WebAuthn1.IsWebAuthnRequest(aRequestInfo.RawHeaders) then
  sgcWSAPIServer_WebAuthn1.DoProcessHTTP(aConnection, aRequestInfo.RawHeaders);

返回方法