TsgcWSAPIServer_WebPushProperties › WebPush

WebPush プロパティ

Web Push 設定のオプションコンテナ: VAPID キー、クライアント TLS/ログ設定、およびコンポーネントが提供する組み込み HTTP エンドポイント。

構文

property WebPush: TsgcWSWebPush_Options read FWebPush write SetWebPush;

デフォルト値

解説

Web Pushブラウザ通知を配信するために必要な3つのサブセクションを公開します。VAPID(DERおよびPEM PKCS8形式でプッシュサービスへの各POSTに署名するために使用するPublicKey、PrivateKey、Subject/mailto)、ClientOptions(内部送信者が使用するTLS、ロギング、HTTPクライアントオプション。Web PushにはOpenSSL 3.0.0が必要)、Endpoints(添付されたTsgcWebSocketHTTPServerが提供するURL: ホーム、WebPush JavaScript、ServiceWorker、VAPIDPublicKey、サブスクリプション、サブスクリプション解除)。DefaultTTL、DefaultUrgency、暗号化パラメータはClientOptionsと呼び出しごとのメッセージ内に保持されるため、サーバーは各ブラウザのサブスクリプションエンドポイントに暗号化されたペイロード(aes128gcm、RFC 8030)をPOSTします。

使用例

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';

プロパティに戻る