TsgcWSAPIServer_WebAuthnMethods › IsWebAuthnRequest

IsWebAuthnRequest Method

Returns True when the incoming URL path matches one of the configured WebAuthn endpoints.

Syntax

function IsWebAuthnRequest(const aHeaders: TStringList): Boolean;

Parameters

NameTypeDescription
aHeadersconst TStringListRaw HTTP request headers (including the request line) from which the URL path is extracted.

Return Value

True when the request URL targets one of the paths configured in EndpointsOptions (registration, authentication, verify, webauthn.js, ...); False otherwise. (Boolean)

Remarks

Useful when the host server must decide whether to delegate the request to the WebAuthn component or keep its own handling. DoProcessHTTP calls this method internally before starting the registration or authentication flow.

Example

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

Back to Methods