TsgcWSAPIServer_WebAuthn › Properties › Server
HTTP server component the WebAuthn API is attached to (TsgcWebSocketHTTPServer or TsgcWebSocketServer_HTTPAPI).
property Server: TsgcWSComponent_Server read FServer write SetServer;
nil
References the HTTP/WebSocket server component that hosts the WebAuthn endpoints. Assign a TsgcWebSocketHTTPServer or TsgcWebSocketServer_HTTPAPI to publish the URLs defined in EndpointsOptions. WebAuthn requires a secure context, so the server must be configured with SSL/TLS (OpenSSL 3.0.0+) and reachable over HTTPS at the hostname declared in WebAuthnOptions.RelyingParty. The property is required — if it is nil no WebAuthn endpoint is served.
oHTTPServer := TsgcWebSocketHTTPServer.Create(nil);
oHTTPServer.Port := 443;
oHTTPServer.SSL := True;
oWebAuthn := TsgcWSAPIServer_WebAuthn.Create(nil);
oWebAuthn.Server := oHTTPServer;
oWebAuthn.WebAuthnOptions.RelyingParty := 'www.test.com';
oHTTPServer.Active := True;