TsgcWSAPIServer_WebAuthnWłaściwości › Server

Server Właściwość

Komponent serwera HTTP, do którego jest dołączony interfejs WebAuthn API (TsgcWebSocketHTTPServer lub TsgcWebSocketServer_HTTPAPI).

Składnia

property Server: TsgcWSComponent_Server read FServer write SetServer;

Wartość domyślna

nil

Uwagi

Odwołuje się do komponentu serwera HTTP/WebSocket hostującego endpointy WebAuthn. Należy przypisać obiekt TsgcWebSocketHTTPServer lub TsgcWebSocketServer_HTTPAPI, aby opublikować adresy URL zdefiniowane we właściwości EndpointsOptions. WebAuthn wymaga bezpiecznego kontekstu, więc serwer musi być skonfigurowany z SSL/TLS (OpenSSL 3.0.0+) i dostępny przez HTTPS pod nazwą hosta zadeklarowaną we właściwości WebAuthnOptions.RelyingParty. Właściwość jest wymagana — jeśli ma wartość nil, żaden endpoint WebAuthn nie jest udostępniany.

Przykład

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;

Wróć do Właściwości