TsgcWSAPIServer_WebPush › Propiedades › WebPush
Contenedor de opciones para la configuración de Web Push: claves VAPID, ajustes de TLS/registro del cliente y los endpoints HTTP integrados que sirve el componente.
property WebPush: TsgcWSWebPush_Options read FWebPush write SetWebPush;
—
Expone tres subsecciones necesarias para entregar notificaciones Web Push: VAPID (PublicKey, PrivateKey y Subject/mailto usados para firmar cada POST al servicio push en formatos DER y PEM PKCS8); ClientOptions (opciones de TLS, registro y cliente HTTP utilizadas por el remitente interno — Web Push requiere OpenSSL 3.0.0); y Endpoints (las URL servidas por el TsgcWebSocketHTTPServer adjunto: Home, javascript de WebPush, ServiceWorker, VAPIDPublicKey, Subscription y Unsubscription). DefaultTTL, DefaultUrgency y los parámetros de cifrado se incluyen en ClientOptions y en el mensaje por llamada, de modo que el servidor envía una carga útil cifrada (aes128gcm, RFC 8030) al endpoint de suscripción de cada navegador.
sgcWSAPIServer_WebPush1.WebPush.VAPID.DER.PublicKey := 'BASE64URL_PUBLIC_KEY';
sgcWSAPIServer_WebPush1.WebPush.VAPID.DER.PrivateKey := 'BASE64URL_PRIVATE_KEY';
sgcWSAPIServer_WebPush1.WebPush.VAPID.Details.Subject := 'mailto:info@esegece.com';
sgcWSAPIServer_WebPush1.WebPush.ClientOptions.Log := True;
sgcWSAPIServer_WebPush1.WebPush.Endpoints.Home.Endpoint := '/sgcWebPush.html';