TsgcWSAPIServer_WebAuthn › Propriétés › Server
Composant serveur HTTP auquel l'API WebAuthn est rattachée (TsgcWebSocketHTTPServer ou TsgcWebSocketServer_HTTPAPI).
property Server: TsgcWSComponent_Server read FServer write SetServer;
nil
Référence le composant serveur HTTP/WebSocket qui héberge les points de terminaison WebAuthn. Assignez un TsgcWebSocketHTTPServer ou un TsgcWebSocketServer_HTTPAPI pour publier les URL définies dans EndpointsOptions. WebAuthn nécessite un contexte sécurisé, donc le serveur doit être configuré avec SSL/TLS (OpenSSL 3.0.0+) et accessible via HTTPS au nom d'hôte déclaré dans WebAuthnOptions.RelyingParty. La propriété est obligatoire — si elle est nil, aucun point de terminaison WebAuthn n'est servi.
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;